RESTful mixin, mixin repo?
Jonas Pfenniger
zimba.tm at gmail.com
Wed Nov 15 03:29:26 EST 2006
On 14/11/06, Mark Fredrickson <mark.m.fredrickson at gmail.com> wrote:
> I'd be happy to include this on the wiki. Can some explain how to add
> a helper function into the including module's namespace?
>
> eg. How do I get
>
> module Camping
> module REST
> module Helpers
> def form ...
> end
> end
> end
> end
>
> properly mixed in (so as to provide a form helper to override markaby)
> using 'include Camping::REST'
You'll have to use the included callback.
like :
module REST
def self.included(app)
app::Helpers.send :include, Helpers
end
end
--
Cheers,
zimbatm
http://zimbatm.oree.ch
More information about the Camping-list
mailing list