search for: current_site

Displaying 1 result from an estimated 1 matches for "current_site".

Did you mean: current_date
2007 Mar 22
0
`alias_method_chain': undefined method `find' for class `ActiveRecord::Base' (NameError)
I can''t seem to be able to override the :find method in the model base class, for example, in /lib/usermonitor.rb: module ActiveRecord module UserMonitor def self.included(base) base.class_eval do alias_method_chain :find, :user def current_site Thread.current[:user] end end end def find_with_user(*args) ... end end end I got this error: `alias_method_chain'': undefined method `find'' for class `ActiveRecord::Base'' (NameError) However, overriding :create and :update me...