Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Weird scaffold behavior #4374
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.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
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:
As you can see, many of them are not plurals of a word that ends in ...ouse.