NoMethodError when trying to invoke helper method from Rails controller

Posted by John Topley on Stack Overflow See other posts from Stack Overflow or by John Topley
Published on 2009-01-17T18:18:54Z Indexed on 2010/05/06 16:58 UTC
Read the original article Hit count: 186

Filed under:
|

I'm getting a NoMethodError when trying to access a method defined in one of my helper modules from one of my controller classes. My Rails application uses the helper class method with the :all symbol as shown below:

class ApplicationController < ActionController::Base
  helper :all
  .
  .
end

My understanding is that this should make all of my controller classes automatically include all of the helper modules within the app/helpers directory, therefore mixing in all of the methods into the controllers. Is this correct?

If I explicitly include the helper module within the controller then everything works correctly.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails