Why can I access helper methods for one controller in the views for a different controller? Is there a way to disable this without hacking/patching Rails?
@George Schreiber's method doesn't work as of Rails 3.1; the code has changed significantly.
However, there's now an even better way to disable this feature in Rails 3.1 (and hopefully later). In your config/application.rb, add this line:
config.action_controller.include_all_helpers = false
This will prevent ApplicationController from loading all of the helpers.
(For anyone who is interested, here's the pull request where the feature was created.)
2.1m questions
2.1m answers
60 comments
57.0k users