Thursday, September 10, 2009

Uninitialized Constant error on Controller

If for whatever reason you have screwed up your controller names by having singular where you should have plural or whatever, you can correct this problem through your routes file. here's a quote that helped me fix a problem with restful_authentication plugin.



for those people that used a singular Session and get the "uninitialized constant SessionsController"

So instead of
map.resource :session
use rather
map.resource :session, :controller => 'session'

No comments: