To include a Rails helper, helper :helper_name and to include all helpers, helper :all is specified in the application_controller.
Now, how to include say N-1 of the available helpers? In other words, how to exclude a very few helpers?
To include a Rails helper, helper :helper_name and to include all helpers, helper :all is specified in the application_controller.
Now, how to include say N-1 of the available helpers? In other words, how to exclude a very few helpers?
I think you would need to write a custom method (say, all_helpers
) to get symbols (:foo
) or module names (FooHelper
) for all of your helpers (probably via file system calls to the app/helpers
directory) and then allow an exclusion list to be passed to the method. Then call it something like:
helper all_helpers(:exclude => :bar)
Take a look at Rails' ActionController::Helpers#all_application_helpers
method for details on how to pull helper names from the filesystem.