I am developing a Rails app which should rely on existing database. There are a couple of table names there which are the always plural words, like "Series".
Application is not working 开发者_如何学运维correctly with the models associated with them. How would you propose to deal with it - is there any solution without changing the naming?
Thanks in advance!
It sounds like you need to tell Rails that "Series" is uncountable - that is, that it shouldn't try inflecting it for singular/plural. To do this, add the line inflect.uncountable 'series'
to your config/initializers/inflections.rb
file.
Curiously, however, "series" appears to be uncountable by default; did you just pick it as an example out of a number of similar names?
精彩评论