views:

88

answers:

2

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?

A: 

I don't think you can

marcgg
+2  A: 

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.

Barry Hess