On Jun 19, 10:28 pm, Constantin Gavrilescu
<comisarulmoldo...@gmail.com> wrote:
> On 14 juin, 05:18, Frederick Cheung <frederick.che...@gmail.com>
> wrote:
>
> > > How can I pass the reference to the right helper method?
>
> > helper_methods are not methods of the controller - they are methods of
> > the associated helper module (usually CustomerEmployeesHelper in this
> > case). Does that help ?
>
> I realize that.
> I want to call a helper method column_list available when running
> CustomersEmployeesController. CustomersEmployeesController inherits
> from CompaniesController, which includes the helper method needed. I
> cannot hardcode the file name of the module where this method is,
> because I might redefine it later in CustomersEmployeesHelper and that
> would drive crazy the maintenance programmer when will find that
> normal mechanisms of inheritance don't work.
>
> I thought that instantiating CustomersEmployeesController will include
> automatically his Helper module, but it appears it doesn't.

Why not put the relevant helper methods in a module that both
controllers use ?

Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to