Archive for February, 2009

Remember that Rails has Forbidden Model Names

February 24th, 2009

This took me a while this morning, why why why was my Model, “Modules”, not working?  Rails scaffolded the whole thing, the DB table was there, but I kept getting:

undefined method `find' for Module:Class

Whenever I tried to utilize the find() method, or:

undefined method `quoted_table_name' rails hasmany through

In my hasmany => through association.  Geh.

Eventually, I remembered that yes, Ruby and Rails both have a set of names that are restricted for use, handily listed here below the fold, but also on at: http://wiki.rubyonrails.org/rails/show/ReservedWords

» Read more: Remember that Rails has Forbidden Model Names