Links
Twitter
Flickr
« This space... | Main | Writing Portfolios »
Thursday
Jul312008

Rails: Don't create a controller namespace with the same name as one of your models

For example:

I have a model Partner and I have a parter section of the site I'm building so I created a namespace Partner.

That results in lots of these:

inflector.rb:298: warning: toplevel constant SignupsController referenced by Partner::SignupsController

and that results in lots of these:

:( :( :(


Jeremy Voorhis Says:
June 30, 2006 at 10:04 am
In Ruby, you cannot have a class and a module with the same name.


More here.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>