|
Re: Re: RESTful mixin, mixin repo?: msg#00017lang.ruby.camping.general
On 14/11/06, Mark Fredrickson <mark.m.fredrickson-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> 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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Catching a list of variables with a Controller, Manfred Stienstra |
|---|---|
| Next by Date: | Re: Catching a list of variables with a Controller, Roland Crosby |
| Previous by Thread: | Re: Re: RESTful mixin, mixin repo?, Mark Fredrickson |
| Next by Thread: | Re: RESTful mixin, mixin repo?, Jonas Pfenniger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |