Sha256: 2e2119d5d488d33150b6076487ec442c5b402f695c33cbbf975ae9c99208fe44
Contents?: true
Size: 514 Bytes
Versions: 3
Compression:
Stored size: 514 Bytes
Contents
module Trestle module TabHelper def tabs @_trestle_tabs ||= {} end def tab(name, options={}) tabs[name] = tab = Tab.new(name, options) content_tag(:div, id: tab.id(("modal" if modal_request?)), class: ["tab-pane", ('active' if name == tabs.keys.first)], role: "tabpanel") do if block_given? yield elsif options[:partial] render partial: options[:partial] else render partial: name.to_s end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
trestle-0.10.0 | app/helpers/trestle/tab_helper.rb |
trestle-0.10.0.pre2 | app/helpers/trestle/tab_helper.rb |
trestle-0.10.0.pre | app/helpers/trestle/tab_helper.rb |