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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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 http://www.rubyonrails.org/deprecation 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
either:

http://www.ruby-forum.com/topic/82066
http://www.ruby-forum.com/topic/88545

Thanks in advance for your help,

Paul.
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.