Class: Ratchet::ToggleNavHelper::ToggleRow

Inherits:
ToggleNav show all
Defined in:
app/helpers/ratchet/toggle_nav_helper.rb

Instance Method Summary collapse

Methods inherited from ToggleNav

#display, #extract_block, #initialize, #option, #set_toggle_options

Constructor Details

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

Instance Method Details

#display_tag(tag, options, body) ⇒ Object



76
77
78
79
80
81
82
83
84
85
# File 'app/helpers/ratchet/toggle_nav_helper.rb', line 76

def display_tag(tag, options, body )

  options[:class] = "toggle-row #{@options[:class]}".strip
  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