This line makes it sound important but it is commented out. Where
can I
learn about what these are and how they function?
Read on ActiveRecord::Observer for the documentation. Moreover,
CacheSweepers are also observers.
Observers are singletons that “watch” your ActiveRecords and fire
when active records are modified (basically, they are standalone
callback containers, so to speak). An observer can be asked to watch
a particular set of models, and a method on the observer is called
for every AR callback.
The configuration is there because the observer needs to be
instantiated explicitly after defining them, as in
ChangeNotifier.instance
or hooked into the controller via the
observers :change_notifier, :html_cleaner line.
Observers are super-cool, for instance if you want to send e-mails
everytime a comment is posted to something etc.
–
Julian ‘Julik’ Tarkhanov
me at julik.nl
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.