Working on an ActiveRecord plugin. It's a bit of a complex thing in which in an instance method, the domain logic requires a search on the table.
In the code below, the find in do_object_stuff gripes with an undefined method error.
self.find, parent.find, super.find, and just find don't work -- while most of those errors make sense to me, I am surprised that a plain find doesn't work. It's just a class method, shouldn't an instance be able to just use that?
Weak brain moment... I can't see what I am missing. Not sure if the plugin context is relevant or not.
def self.included(base) .... etc....
module ActMethods .... etc....
def do_class_stuff(parameters) ..... record = find(:key_value, :select => select_fields) ..... end end
def do_object_stuff(parameters) ..... record = find(:key_value, :select => select_fields) ..... end end end