Association extend rails 2 feature

I’ve been looking on the internet for the feature in rails where you can
specify an association extend module on the actual class.

So for example

class Printer < AR::Base
some_association_extend_method_that_i_cant_figure_out do
def
find_by_name(value)
end
end
end
class Product < AR::Base
has_many :printers
end

product.printers[“name”] # <-- should return the printer if it exists
Product[“name”] # <-- should work as well.

Does anyone know what im talking about? I saw it once, I can’t find it
again.

On Sep 13, 4:53 am, Aryk G. [email protected]
wrote:

end

Posted viahttp://www.ruby-forum.com/.

Maybe you’re looking for has_finder or, in Rails 2.1, named_scope.

yes thats what i was looking for. thx.