class TwitterBootstrap::ButtonGroupWithTabsBuilder
Public Class Methods
new(view_context)
click to toggle source
Calls superclass method
TwitterBootstrap::ButtonGroupBuilder::new
# File lib/twitter_bootstrap_helpers/button_group_builder.rb, line 44 def initialize(view_context) super(:radio, view_context) @tabs = "" end
Public Instance Methods
build(block)
click to toggle source
# File lib/twitter_bootstrap_helpers/button_group_builder.rb, line 49 def build(block) block.call(self) buttons = @view_context.content_tag(:div, @buttons.html_safe, class: 'btn-group', data: {toggle: 'buttons-radio'}) tabs = @view_context.content_tag(:div, @tabs.html_safe, class: 'tab-content') @view_context.content_tag(:div, buttons << tabs, class: 'tabbable') end