merb-gen resource with singular words that end in 's'
Reported by Ben Erickson | May 11th, 2008 @ 11:45 PM | in 1.0 (Nearish Future)
merb-* versions are mostly 0.9.3
If you try to generate a resource using a word that is singular but ends in the letter 's', merb-gen attempts to singularize that word for the model, which usually results in an incorrectly named model.
example:
> merb-gen resource bus
dependency model
exists app
exists app/models
create app/models/bu.rb
dependency merb_model_test
exists spec
exists spec/models
create spec/models/bu_spec.rb
merb-gen model gets it correct however, as do the controllers and everything else that pluralizes the word.
merb-gen model output from console:
> merb-gen model bus
exists app
exists app/models
create app/models/bus.rb
dependency merb_model_test
exists spec
exists spec/models
create spec/models/bus_spec.rb
Comments and changes to this ticket
-
Michael Klishin (antares) May 13th, 2008 @ 03:10 PM
- → Milestone changed from to 1.0 (Nearish Future)
- → State changed from new to open
- → Assigned user changed from to Michael Klishin (antares)
-

Max May 15th, 2008 @ 03:47 PM
Here's a quickie fix...not sure if it's the "best" solution, but it's a solution.
Now, you're constrained to using the singular form when using merb-gen resource.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
