Methods
Instance Public methods
helper_attr(*attrs) Link
Declares helper accessors for controller attributes. For example, the following adds new name
and name=
instance methods to a controller and makes them available to the view: attr_accessor :name helper_attr
:name
Parameters
-
attrs
- Names of attributes to be converted into helpers.
helpers() Link
Provides a proxy to access helper methods from outside the view.
Note that the proxy is rendered under a different view context. This may cause incorrect behavior with capture methods. Consider using helper instead when using capture
.
modules_for_helpers(args) Link
Override modules_for_helpers
to accept :all
as argument, which loads all helpers in helpers_path.
Parameters
-
args
- A list of helpers
Returns
-
array
- A normalized list of modules for the list of helpers provided.