Skip to content

Commit

Permalink
Alphabetize radio button method
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Apr 26, 2020
1 parent f784bc9 commit c7468a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/client_side_validations/action_view/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit c7468a6

Please sign in to comment.