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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Rob Sanheim
2007-Jan-25 17:31 UTC
Re: Deprecated "model" - what should it be replaced with?
On 1/25/07, Paul Butcher <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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. >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 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---