Deprecated "model" - what should it be replaced with?

So we’ve upgraded to Rails 1.2.1, and are getting deprecation warnings
about “model”. We have a single occurrence in our application.rb, put
there by the login_generator (the documentation for which still, BTW,
suggests that a model declaration needs to be added to application.rb).

So what should we replace it with? Is there any documentation anywhere?
I’ve searched and all that I can find are lists of what’s deprecated.

The warning refers us to but, it
would be fair to say, that page is somewhat unhelpful :slight_smile:

I notice that I’m not the first person to ask this question, but there
doesn’t seem to be a definitive answer to any of the previous queries

Thanks in advance for your help,


On 1/25/07, Paul B. [email protected] wrote:

would be fair to say, that page is somewhat unhelpful :slight_smile:

Are you using that old login generator, the salted hash one? If so,
you can probably just remove the :model calls. The new autoloading
that happens with models should work fine, assuming you are following
normal Rails conventions (ie user.rb holds a User model). We have an
old application that uses the salted hash login generator, and we just
removed the model calls.

Also, don’t use that generator for anything new =). Take a look at
acts_as_authenticated for something more up to date with the latest
rails stuff.

  • Rob