On Wed, 21 Apr 2010 12:39:41 -0700 (PDT)
tenstates <[email protected]> wrote:
>
> This has been bugging me but how best do I share a bunch of methods
> across multiple models?
>
modules. Which is standard ruby.
module DescriptiveName
def useful_method
# ...
end
def another_useful_method
end
end
class ModelClass
include DescriptiveName
end
Or if you want class methods, extend!
Regards
Jon
--
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.