module Draper::ViewHelpers
Provides the {#helpers} method used in {Decorator} and {CollectionDecorator} to call the Rails
helpers.
Public Instance Methods
helpers()
click to toggle source
Access the helpers proxy to call built-in and user-defined Rails
helpers. Aliased to ‘h` for convenience.
@return [HelperProxy] the helpers proxy
# File lib/draper/view_helpers.rb, line 24 def helpers Draper::ViewContext.current end
Also aliased as: h
localize(*args)
click to toggle source
Alias for ‘helpers.localize`, since localize is something that’s used quite often. Further aliased to ‘l` for convenience.
# File lib/draper/view_helpers.rb, line 31 def localize(*args) helpers.localize(*args) end
Also aliased as: l