On Sun, Oct 9, 2011 at 9:09 AM, Shanison <lxsh...@gmail.com> wrote:
> Hi all,
> I have some methods that needs to be used by all helpers in the
> extensions. So I need to add some methods to ApplicationHelper. I
> can't just create the application_helper.rb in my extensions, it will
> just overwrite the application_helper in radiant and only my own
> methods in the application_helper.rb is visible.
> I tried to do ApplicationHelper.send(:include,
> MyExtensions::ApplicationHelperExtensions) when activating the
> extension. However, those methods in ApplicationHelperExtensions are
> also not visible to my helpers. I tried to use rails console and do
> ApplicationHelper.instance_methods.include?('my_method_name')
> It returns true. I don't understand why my helpers are not able to
> pick up those methods. Any help is appreciated. Thanks.

I don't think you need to extend the ApplicationHelper, you just need
to include a new helper into ApplicationController

Does this example from the Help extension work for you?

OOP, DCI, and Ruby

Jim Gay
Saturn Flyer LLC

Reply via email to