I''m using the login_generator and with this new version of Rails, I can''t even get my app to work. Everything gives a 500 error. In the console, it says this error: undefined method `model'' for ApplicationController:Class In the login_generator plugin, you''re supposed to put this command in the application controller: model :user When I took it out, it complained about something else...something to do with secrets. So how can I fix this? :( --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 28 Dec 2007, at 20:40, Mike C wrote:> > I''m using the login_generator and with this new version of Rails, I > can''t even get my app to work. Everything gives a 500 error. In the > console, it says this error: > > undefined method `model'' for ApplicationController:Class > > In the login_generator plugin, you''re supposed to put this command in > the application controller: > > model :user >model is dead. don''t use it.> When I took it out, it complained about something else...something to > do with secrets. So how can I fix this? :(That''s something else. The default session store is the cookie store in rails 2.0, which requires you to define a secret in your environment.rb. i.e. config.action_controller.session = { :session_key => ''_empty_app_session'', :secret => ''your secret here'' } If you generate a new app rails will create a nice long safe secret for you. You can run rake secret to get rails to generate you a nice secret. Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks a bunch! Solved my problem. :D On Dec 28, 1:40 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 28 Dec 2007, at 20:40, Mike C wrote: > > > > > I''m using the login_generator and with this new version of Rails, I > > can''t even get my app to work. Everything gives a 500 error. In the > > console, it says this error: > > > undefined method `model'' for ApplicationController:Class > > > In the login_generator plugin, you''re supposed to put this command in > > the application controller: > > > model :user > > model is dead. don''t use it. > > > When I took it out, it complained about something else...something to > > do with secrets. So how can I fix this? :( > > That''s something else. The default session store is the cookie store > in rails 2.0, which requires you to define a secret in your > environment.rb. > > i.e. > config.action_controller.session = { > :session_key => ''_empty_app_session'', > :secret => ''your secret here'' > } > > If you generate a new app rails will create a nice long safe secret > for you. You can run > rake secret > to get rails to generate you a nice secret. > > Fred--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---