New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird scaffold behavior #4374
Comments
Take a look at config/initializers/inflections.rb and add to the block: I think this issue can be closed ? |
I can do that, however it still seems like a bug since the model layer was generated correctly using Slice, and the controller should really be doing Slice.all, not Slices (or Slouse) .all Feel free to close the issue if you disagree. |
I tried this on rails HEAD and it is still broken. It appears the ActiveSupport::Inflector doesn't anchor the regex that looks for (m|l)ice$ to the start of the string. So any word that ends in (m|l)ice will match as a plural and AS will incorrectly turn it into ...ouse for the model name. Here is a list of words from /usr/share/dict that end in (m|l)ice: accomplice As you can see, many of them are not plurals of a word that ends in ...ouse. Fix forthcoming. |
This pull request fixes the problem: #5177 |
A placemarker for follow-up (@jeremyf) |
Pull request was merged, closing here, thanks! |
3.2.0.rc2, ruby-1.9.2-p290
rails g scaffold slices title:string results in odd behavior.
It warns that its using singular (okay, my bad, thanks), which is fine but the generated controllers and views use Slouse as the model name instead of Slice. The model was created correctly as Slice.
The text was updated successfully, but these errors were encountered: