Skip to content

Commit

Permalink
Added classes for checkbox and radio buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2000 committed Feb 7, 2012
1 parent 560d88d commit 391cbd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twitter_bootstrap_form_for/form_builder.rb
Expand Up @@ -106,7 +106,7 @@ def inline(label = nil, &block)
define_method toggle do |attribute, *args, &block|
label = args.first.nil? ? '' : args.shift
target = self.object_name.to_s + '_' + attribute.to_s
label_attrs = toggle == :check_box ? { :for => target } : {}
label_attrs = toggle == :check_box ? { :for => target, :class => 'checkbox' } : { :class => 'radio' }

template.content_tag(:li) do
template.concat template.content_tag(:label, label_attrs) {
Expand Down

0 comments on commit 391cbd7

Please sign in to comment.