I need to call a helper method from another controller.  The catch is
that I have the same method name defined in my current controllers
helper.

Here the partial will use the the default column_list defined in my
helper.
<%=render 'companies/company', :object => @company%>
For example, if I change the call to specify the method, it still runs
great:
<%=render 'companies/company', :object => @company, :locals =>
{:column_list => method(:column_list)}%>

Here I want to use another's helper column_list:
<%=render 'companies/companies', :object =>
@customers_employees, :locals => {:column_list =>
CustomersEmployeesController.new.method(:column_list)} %>

I get this error:
undefined method `column_list' for class
`CustomersEmployeesController'

How can I pass the reference to the right helper method?
--~--~---------~--~----~------------~-------~--~----~
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