Class: Tungsten::ToggleNavHelper::ToggleRow

Inherits:
ToggleNav
  • Object
show all
Defined in:
app/helpers/tungsten/toggle_nav_helper.rb

Instance Method Summary collapse

Methods inherited from ToggleNav

#display, #initialize, #option, #set_toggle_options

Constructor Details

This class inherits a constructor from Tungsten::ToggleNavHelper::ToggleNav

Instance Method Details

#display_tag(tag, options, body) ⇒ Object



73
74
75
76
77
78
79
80
81
82
# File 'app/helpers/tungsten/toggle_nav_helper.rb', line 73

def display_tag(tag, options, body )

  options[:class] = "toggle-row #{@options[:class]}"
  label = (:span, class: 'toggle-row-label-text') { options.delete(:label) } if options[:label]

  (tag, options) {
    concat label
    concat ('div', class: 'toggle-row-panel') { body }
  }
end