diff --git a/lib/client_side_validations/action_view/form_builder.rb b/lib/client_side_validations/action_view/form_builder.rb index bd8426c9f..5baa9e700 100644 --- a/lib/client_side_validations/action_view/form_builder.rb +++ b/lib/client_side_validations/action_view/form_builder.rb @@ -62,12 +62,6 @@ def collection_select(method, collection, value_method, text_method, options = { super(method, collection, value_method, text_method, options, html_options) end - def radio_button(method, tag_value, options = {}) - build_validation_options(method, options) - options.delete(:validate) - super(method, tag_value, options) - end - def fields_for(record_name, record_object = nil, fields_options = {}, &block) if record_object.is_a?(Hash) && record_object.extractable_options? fields_options = record_object @@ -90,6 +84,12 @@ def grouped_collection_select(method, collection, group_method, group_label_meth super(method, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options) end + def radio_button(method, tag_value, options = {}) + build_validation_options(method, options) + options.delete(:validate) + super(method, tag_value, options) + end + def select(method, choices = nil, options = {}, html_options = {}, &block) build_validation_options(method, html_options.merge(name: options[:name])) html_options.delete(:validate)