Model command?

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? :frowning:

On 28 Dec 2007, at 20:40, Mike C wrote:

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? :frowning:

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

Thanks a bunch! Solved my problem. :smiley:

On Dec 28, 1:40 pm, Frederick C. [email protected]