Observers in Rails 1.2

Posted by Gregg Kellogg Sat, 27 Jan 2007 03:13:00 GMT

Thanks to Rick Olson for providing assistance with the proper syntax for instantiating observers in Rails 1.2. The old way was to add an observer statement to the appropriate controler, such as:
observer :user_observer

Hidden in the ignored parts of conf/environment.rb was the proper notation:

# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector

This makes the last of my deprecation messages go away!

Gregg

Posted in  | no comments | no trackbacks