My "application_helper.rb" become to large. I have basic functions that I use for all projects. Is it possible to define thoses functions inside an external "basic_helper.rb" and include it in "application_helper.rb" ?
Pat Maddox
2006-Mar-04 10:46 UTC
[Rails] application_helper can "include" another helper ?
Sure. Make your BasicHelper module and include BasicHelper in your application_helper.rb file. You''ll of course have to stick basic_helper.rb in lib/ and require it in application_helper.rb Pat On 3/4/06, oo00oo <oo00oo@free.fr> wrote:> My "application_helper.rb" become to large. > I have basic functions that I use for all projects. > Is it possible to define thoses functions inside an external > "basic_helper.rb" and include it in "application_helper.rb" ? > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Not possible do to that without stick the helper file inside lib folder ? I don''t like the lib folder. You need to restart the server to apply change from lib folder. In local this is easy but a bit boring, but online...> Sure. Make your BasicHelper module and > include BasicHelper > in your application_helper.rb file. You''ll of course have to stick > basic_helper.rb in lib/ and require it in application_helper.rb > > Pat >