Permalink
Browse files

[bug-fix] show correct labels for radio-buttons

  • Loading branch information...
1 parent 6c7a2d0 commit b576e7b13671457977ca9fdf0af80e888a21296c @ChaosSteffen committed Jul 7, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/yaml_form_builder.rb
View
@@ -58,10 +58,10 @@ def check_box(attribute, label_text, options={}, checked_value = "1", unchecked_
end
end
- def radio_button(attribute, label_text, tag_value, options)
+ def radio_button(attribute, label_text, tag_value, options={})
@template.content_tag :div, :class => :"type-check" do
super(attribute, tag_value, options) +
- label(attribute, label_text)
+ label("#{attribute.to_s.downcase}_#{tag_value.to_s.downcase}".to_sym, label_text)
end
end
end

0 comments on commit b576e7b

Please sign in to comment.