ActioinController::observer generates a deprecation warning in 1.2, however there doesn''t seem to be a replacement. I have a couple of cases where I have an observer (eg UserObserver) that must be instantiated in order for the obserer to be called. Removing the observer declaration at the beginning of the controller eliminates the warning, but doesn''t result in the observer being called. What is the right way to do this in 1.2? Gregg --~--~---------~--~----~------------~-------~--~----~ 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 1/25/07, Gregg <gregg-+7pv9bBeZkoOi5MzEVbBygC/G2K4zDHf@public.gmane.org> wrote:> ActioinController::observer generates a deprecation warning in 1.2, > however there doesn''t seem to be a replacement. > > I have a couple of cases where I have an observer (eg UserObserver) > that must be instantiated in order for the obserer to be called. > Removing the observer declaration at the beginning of the controller > eliminates the warning, but doesn''t result in the observer being > called. > > What is the right way to do this in 1.2?In config/environment.rb set config.active_record.observers = [:user] jeremy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jeremy Kemper wrote:> On 1/25/07, Gregg <gregg-+7pv9bBeZkoOi5MzEVbBygC/G2K4zDHf@public.gmane.org> wrote: >> ActioinController::observer generates a deprecation warning in 1.2, >> however there doesn''t seem to be a replacement. >> >> I have a couple of cases where I have an observer (eg UserObserver) >> that must be instantiated in order for the obserer to be called. >> Removing the observer declaration at the beginning of the controller >> eliminates the warning, but doesn''t result in the observer being >> called. >> >> What is the right way to do this in 1.2? > > In config/environment.rb set > config.active_record.observers = [:user] > > jeremynice to get this info... but where can we find the documentation about this ''right way''.. thanks -- 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 -~----------~----~----~----~------~----~------~--~---