module NicePartials::Helper
Public Instance Methods
nice_partials_pop_t_prefix()
click to toggle source
# File lib/nice_partials/helper.rb, line 13 def nice_partials_pop_t_prefix @_nice_partials_t_prefixes ||= [] @_nice_partials_t_prefixes.pop end
nice_partials_push_t_prefix(prefix)
click to toggle source
# File lib/nice_partials/helper.rb, line 8 def nice_partials_push_t_prefix(prefix) @_nice_partials_t_prefixes ||= [] @_nice_partials_t_prefixes << prefix end
np()
click to toggle source
# File lib/nice_partials/helper.rb, line 4 def np NicePartials::Partial.new(self) end
t(key, options = {})
click to toggle source
Calls superclass method
# File lib/nice_partials/helper.rb, line 18 def t(key, options = {}) if @_nice_partials_t_prefixes&.any? && key.first == '.' key = "#{@_nice_partials_t_prefixes.last}#{key}" end super(key, **options) end