Calling helper of different controller
Added by Jacky Leung about 14 years ago
Hi I am a bit new of ruby on rails, so I am still trying to understand how RoR works.
Currently I am developing a plugin that will create a query as the issue list generation. However I have encountered a problem that when I render the Query form, it is calling certain functions within QueriesHelper. Currently I have a temporary solution of copy all methods within QueriesHelper into my view's helper, but this is not a good option as any internal change of queries view will break my code. So ideally I prefer to be able to call the QueriesHelper from somewhere else instead of copy and paste the method
Replies (1)
RE: Calling helper of different controller
-
Added by Jacky Leung about 14 years ago
issue solved by adding
helper :queries
include QueriesHelper