neorails-form_fu 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/form_fu.gemspec +1 -1
- data/lib/form_fu/form_builder.rb +2 -2
- metadata +1 -1
data/form_fu.gemspec
CHANGED
data/lib/form_fu/form_builder.rb
CHANGED
|
@@ -3,7 +3,7 @@ module FormFu
|
|
|
3
3
|
# A form builder that produces tableless, lined-up forms.
|
|
4
4
|
class FormBuilder < ActionView::Helpers::FormBuilder
|
|
5
5
|
# automatically wrap all the standard formbuilder helpers
|
|
6
|
-
(field_helpers - %w(label radio_button
|
|
6
|
+
(field_helpers - %w(label hidden_field radio_button check_box text_area apply_form_for_options!)).each do |selector|
|
|
7
7
|
src = <<-END_SRC
|
|
8
8
|
def #{selector}(field, options = {}, &block)
|
|
9
9
|
format_with_label(field, options.merge(:field_type => "#{selector}"), super(field, purge_custom_tags(options)), &block)
|
|
@@ -36,7 +36,7 @@ module FormFu
|
|
|
36
36
|
# build radio choices html
|
|
37
37
|
choices_html = ""
|
|
38
38
|
choices.each do |key, value|
|
|
39
|
-
radio_html =
|
|
39
|
+
radio_html = radio_button(field, value)+key
|
|
40
40
|
|
|
41
41
|
# wrap radio html in a label (for easier selection)
|
|
42
42
|
choices_html << @template.content_tag(:label, radio_html, :class => "radio-option")
|