Last active
August 29, 2015 13:57
-
-
Save stex/9528784 to your computer and use it in GitHub Desktop.
Helper Method to exclude certain helpers from all_application_helpers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Don't forget to turn auto-loading all helpers off: | |
# config.action_controller.include_all_helpers = false | |
class ActionController::Base | |
class << self | |
def all_helpers(options = {}) | |
all_helpers_from_path(helpers_path) - Array(options[:except]) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment