Forum: Ruby on Rails Deprecated "model" - what should it be replaced with?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Paul B. (Guest)
on 2007-01-25 18:52
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 :-)

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,

Rob S. (Guest)
on 2007-01-25 19:32
(Received via mailing list)
On 1/25/07, Paul B. <removed_email_address@domain.invalid> wrote:
> would be fair to say, that page is somewhat unhelpful :-)
> Paul.

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
This topic is locked and can not be replied to.