helper:foo# => requires 'foo_helper' and includes FooHelperhelper'resources/foo'# => requires 'resources/foo_helper' and includes Resources::FooHelper# One linehelper{defhello()"Hello, world!"end}# Multi-linehelperdodeffoo(bar)"#{bar} is the very best"endendclassApplicationController<ActionController::Basehelper_method:current_user,:logged_in?defcurrent_user@current_user||=User.find_by_id(session[:user])enddeflogged_in?current_user!=nilendend
The answer depends on the Rails version.
Rails >= 3.1
Change the include_all_helpers config to false in any environment where you want to apply the configuration. If you want the config to apply to all environments, change it in application.rb.