module ActionController::Helpers::ClassMethods
def all_application_helpers
def all_application_helpers all_helpers_from_path(helpers_path) end
def helper_attr(*attrs)
* `attrs` - Names of attributes to be converted into helpers.
#### Parameters
helper_attr :name
attr_accessor :name
makes them available to the view:
following adds new `name` and `name=` instance methods to a controller and
Declares helper accessors for controller attributes. For example, the
def helper_attr(*attrs) attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") } end
def helpers
[helper](rdoc-ref:AbstractController::Helpers::ClassMethods#helper) instead
incorrect behavior with capture methods. Consider using
Note that the proxy is rendered under a different view context. This may cause
Provides a proxy to access helper methods from outside the view.
def helpers @helper_proxy ||= begin proxy = ActionView::Base.empty proxy.config = config.inheritable_copy proxy.extend(_helpers) end end
def modules_for_helpers(args)
* `array` - A normalized list of modules for the list of helpers provided.
#### Returns
* `args` - A list of helpers
#### Parameters
helpers in helpers_path.
Override modules_for_helpers to accept `:all` as argument, which loads all
def modules_for_helpers(args) args += all_application_helpers if args.delete(:all) super(args) end