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
On 1/25/07, Gregg [email protected] 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
Jeremy K. wrote:
On 1/25/07, Gregg [email protected] 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
nice to get this info… but where can we find the documentation about
this ‘right way’… thanks