Hello, I am getting the following warning: DEPRECATION WARNING: observer is deprecated and will be removed from Rails 2.0 See http://www.rubyonrails.org/deprecation for details. And I would like to know how do I have to replace the ActiveRecord::Observer class. Nowadays, I am using Ruby 1.8.6, do I have to change it for the 2.0 version? I have done a small research, but found almost nothing. On the http://www.rubyonrails.org/deprecation there is nothing about observer. Then,I have read somewhere is that "What''s deprecated is calling ''observer'' from a controller. Instead, you need to set it in your config/environment.rb file: config.active_record.observers = :user_observer" Is it correct? Otherwise what I should change? Thank you for your help, Amagoia. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Oct 18, 6:42 am, amagoia <amagoi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Then,I have read somewhere is that "What''s deprecated is calling > ''observer'' from a controller. Instead, you need to set it in your > config/environment.rb file: > config.active_record.observers = :user_observer" > > Is it correct? Otherwise what I should change?Yes, that''s correct, you need to list your observers in that line instead of calling the old "observer" method in your controller. Jeff softiesonrails.com essentialrails.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 -~----------~----~----~----~------~----~------~--~---
Thank you very much! On Oct 18, 3:46 pm, Jeff <cohen.j...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Oct 18, 6:42 am, amagoia <amagoi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Then,I have read somewhere is that "What''s deprecated is calling > > ''observer'' from a controller. Instead, you need to set it in your > > config/environment.rb file: > > config.active_record.observers = :user_observer" > > > Is it correct? Otherwise what I should change? > > Yes, that''s correct, you need to list your observers in that line > instead of calling the old "observer" method in your controller. > > Jeff > softiesonrails.com > essentialrails.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 -~----------~----~----~----~------~----~------~--~---