Provides an accordion
helper and a tabs
helper
In your Gemfile:
gem 'bootstrap-components-helpers', :git => 'git://gist.github.com/5105757.git'
= accordion do |accordion|
= accordion.pane 'My first pane' do
= render partial: 'my_first_pane'
= accordion.pane 'My second pane' do
= render partial: 'my_second_pane'
accordion
method options :
:accordion_id
: when you want more than one accordion on the same page.
pane
method options :
:open
: when you want that pane to be open on load.
= tabs do |tabs|
- tabs.pane 'My first pane' do
= render partial: 'my_first_pane'
- tabs.pane 'My second pane' do
= render partial: 'my_second_pane'
tabs
method options :
-
:active
: when you want that pane to be active on load. -
:direction
: to control the positioning of the tabs. Valid values arebelow
,left
,right
andabove
(default isabove
). -
:style
:tabs
orpills
(default istabs
).
hi, I don't know why only display the second accordion when i use erb ?? can u help me ?? thanks.
<%= accordion do |aaa|
aaa.pane 'My first pane' do
render 'a'
end
aaa.pane 'My second pane' do
render 'b'
end
end
%>