Displaying 1 result from an estimated 1 matches for "find_with_user".
2007 Mar 22
0
`alias_method_chain': undefined method `find' for class `ActiveRecord::Base' (NameError)
...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 methods work fine. Why?
--~--~---------~--~----~------------~-------~--~----~
You rec...