using helper methods in a view in rails 3

Posted by Frida777 on Stack Overflow See other posts from Stack Overflow or by Frida777
Published on 2010-11-24T13:37:26Z Indexed on 2011/01/03 18:54 UTC
Read the original article Hit count: 163

Filed under:

Hello everyone, there is something that is disturbing me a bit about rails 3. i am trying to upgrade my application from rails 2 to rails 3.

i followed all the steps necessary to do and things were working well for me till now except one thing:

i have a helper method that is defined differently in different helpers, for example it is defined in the application_helper in one way and the same method defined in a different way in the homepage_helper, and defined differently in another helper, let's say video_helper, in addition to that, it is used in a shared view that is used throughout the application, now if i am in the homepage, i want this function to get called from the homepage_helper and if i am in the video page, the function must be called from the video_helper, based on the concept of convention in rails, this worked perfectly in rails 2 but in rails 3, the function is always called from the last helper, alphabetically ordered, that is in the example, video_helper.

How can i fix this? Kindly advice.

Appreciate all the help.

© Stack Overflow or respective owner

Related posts about ruby-on-rails-3