Module: BootstrapTabHelper
- Extended by:
- ActiveSupport::Concern
- Includes:
- BootstrapHelper
- Defined in:
- app/helpers/bootstrap_tab_helper.rb
Defined Under Namespace
Classes: TabBuilder
Instance Method Summary collapse
-
#tabs(index = 0, options = {}, &proc) ⇒ Object
显示tab页 index: 默认显示第几个标签 options: style: pill, tab default: tab position: below, left, right direction of tab align: left, right.
Methods included from BootstrapHelper
#div, #javascript_include_tag_with_p, #merge_predef_class
Instance Method Details
#tabs(index = 0, options = {}, &proc) ⇒ Object
显示tab页 index: 默认显示第几个标签 options:
style: pill, tab default: tab
position: below, left, right direction of tab
align: left, right. the alignment of tab, NOT AVAILABLE NOW
inline: true ,false default: false
stacked: true, false default: false
content_options
every option that can be accepted by div
114 115 116 117 118 119 120 121 |
# File 'app/helpers/bootstrap_tab_helper.rb', line 114 def tabs(index=0, ={}, &proc) = {inline: false, stacked: false, id: 'tabs', style: 'tab'} index, = 0, index if index.is_a?(Hash) builder = TabBuilder.new(index, self, .reverse_merge!()) capture(builder, &proc) builder.to_s end |