Permalink
Browse files

Merge pull request #43 from antonlitvinenko/patch-1

setting @options to opts overwrites options of form builder
  • Loading branch information...
2 parents 57048f7 + 3fe80e2 commit 56c70dcc1f931676d3077e4bb514c411c5958218 @sethvargo committed May 17, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/bootstrap_forms/form_builder.rb
View
5 lib/bootstrap_forms/form_builder.rb
@@ -53,16 +53,15 @@ def check_box(name, *args)
def radio_buttons(name, values = {}, opts = {})
@name = name
- @options = opts
@field_options = opts
control_group_div do
label_field + input_div do
values.map do |text, value|
if @field_options[:label] == '' || @field_options[:label] == false
- extras { radio_button(name, value, @options) + text }
+ extras { radio_button(name, value, @field_options) + text }
else
label("#{@name}_#{value}", :class => [ 'radio', required_class ].compact.join(' ')) do
- extras { radio_button(name, value, @options) + text }
+ extras { radio_button(name, value, @field_options) + text }
end
end
end.join.html_safe

0 comments on commit 56c70dc

Please sign in to comment.