Re: Hook into ActionController::Base properly

Frederick Cheung
2009-06-20T23:04:31Z

On Jun 20, 10:35 pm, Wer Sie
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> Ok, in my example I just forgot to instantiate Test ;-)
>
> t = Test.new
> t.methods.include? ''load_widget''
>  # also results to true
>
> But why I cannot call the method from withing the controller? :-/

How are you calling things ? My guess is you''re trying

class Test< ActionController::Base
  some_method_from_your_plugin
end

For this to work   some_method_from_your_plugin needs to be a class
method (since you are calling it on Test itself, not an instance of
it) but it looks like you''re only adding instance methods.

Fred
> --
> Posted viahttp://www.ruby-forum.com/.