Hi! I want a plugin to supply me with additonal helpers like this: #/vendor/plugins/test_plugin/init.rb module ApplicationHelper def test_helper ''does this work?'' end end Contrary to my expectation, the method "test_helper" is *not* available in my views.. I thought that maybe the module ApplicationHelper is namespaced inside some other class, but I can''t find anything about that in the source code. ApplicationHelperI''m running Rails 0.14.3. Thanks, Rob
Francois Beausoleil
2005-Nov-08 20:42 UTC
Re: extending ApplicationHelper not working with plugins
Hello Robert ! 2005/11/8, Robert <mannl@gmx.com>:> I thought that maybe the module ApplicationHelper is namespaced > inside some other class, but I can't find anything about that in the > source code. > ApplicationHelperI'm running Rails 0.14.3.Take a look at how I do it in the FlashHelperPlugin: http://rubyurl.com/8LU http://opensvn.csie.org/traccgi/flash_helper_plugin/trac.cgi/file/trunk/init.rb The problem is that the ApplicationHelper module does not exist at the moment the plugins are loaded. I too thought ApplicationHelper would simply be reopened, but it doesn't work that way. As suggested by Trevor Squires in the RFC Flash Standardization thead [1], I simply sent the include to ActionView::Base instead. Hope that helps ! -- François http://blog.teksol.info/ [1] http://article.gmane.org/gmane.comp.lang.ruby.rails/28302 [1] http://rubyurl.com/gXj _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails