I’m attempting to assign ActiveRecord Observers to some of my models,
specified in config/environment.rb like so,
config.active_record.observers = :presentation_observer,
:asset_observer, :tag_observer
My models use plugins which extend ActiveRecord::Base, including
Sebastian K.'s file_column
Attempting to boot mongrel yields:
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1129:in
method_missing': undefined method
file_column’ for Video:Class
(NoMethodError)
This seems to indicate the plugins are not yet mixed-in when the
Observers examine the ActiveRecord-descended models.
Implementing dummy stubs in config/environment.rb for these methods
eliminate the errors, but don’t really seem like the right way to do
this.
Anyone else come up with an elegant way to get this going?