Module: Draper::ViewHelpers
- Extended by:
- ActiveSupport::Concern
- Included in:
- CollectionDecorator, Decorator
- Defined in:
- lib/draper/view_helpers.rb
Overview
Provides the #helpers method used in Decorator and CollectionDecorator to call the Rails helpers.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#helpers ⇒ HelperProxy
(also: #h)
Access the helpers proxy to call built-in and user-defined Rails helpers.
-
#localize(*args) ⇒ Object
(also: #l)
Alias for
helpers.localize
, since localize is something that's used quite often.
Instance Method Details
#helpers ⇒ HelperProxy Also known as: h
Access the helpers proxy to call built-in and user-defined
Rails helpers. Aliased to h
for convenience.
24 25 26 |
# File 'lib/draper/view_helpers.rb', line 24 def helpers Draper::ViewContext.current end |
#localize(*args) ⇒ Object Also known as: l
Alias for helpers.localize
, since localize is something that's used
quite often. Further aliased to l
for convenience.
31 32 33 |
# File 'lib/draper/view_helpers.rb', line 31 def localize(*args) helpers.localize(*args) end |