Is there a list of all RoR helpers used in view pages?
Can these helpers be used in both the view pages and action pages?
Is there a list of all RoR helpers used in view pages?
Can these helpers be used in both the view pages and action pages?
Let's first distinguish Helpers
from helpers, in the context of Rails. Helpers are helper methods available in Rails layouts and views you can use to customize the rendering of an element and/or generate HTML code.
The Helper
is available in the official documentation. Helpers are defined in the ActionView::Helpers
namescope and they are grouped into modules, by their scope.
ActionView::Helpers
ActionView::Helpers::ActiveModelFormBuilder
ActionView::Helpers::ActiveModelHelper
ActionView::Helpers::ActiveModelInstanceTag
ActionView::Helpers::AssetTagHelper
ActionView::Helpers::AtomFeedHelper
ActionView::Helpers::AtomFeedHelper::AtomBuilder
ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder
ActionView::Helpers::CacheHelper
...
Click on a module, e.g. ActionView::Helpers::AssetTagHelper, to view all the helper methods defined in the module. By default, a view includes all the view helpers defined in ActionView
, with some small exceptions (a few methods are lazy-loaded).
If you talk about controllers and actions, in the controller you can take advantage of any helper method (and with helper I mean a convenient method to access a feature) defined in the ActionController::Base
class.