1
0
Fork 0
mirror of https://github.com/heartcombo/simple_form.git synced 2022-11-09 12:19:26 -05:00

Merge pull request #1291 from danielevans/feature/interpolated_symbols

Use symbols instead of strings for #send
This commit is contained in:
Carlos Antonio da Silva 2015-08-02 20:39:16 -03:00
commit eac1e0108e
2 changed files with 3 additions and 3 deletions

View file

@ -207,8 +207,8 @@ module SimpleForm
options = args.extract_options!.dup options = args.extract_options!.dup
options[:class] = [SimpleForm.button_class, options[:class]].compact options[:class] = [SimpleForm.button_class, options[:class]].compact
args << options args << options
if respond_to?("#{type}_button") if respond_to?(:"#{type}_button")
send("#{type}_button", *args, &block) send(:"#{type}_button", *args, &block)
else else
send(type, *args, &block) send(type, *args, &block)
end end

View file

@ -6,7 +6,7 @@ module SimpleForm
merged_input_options = merge_wrapper_options(input_html_options, wrapper_options) merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
@builder.send("collection_#{input_type}", @builder.send(:"collection_#{input_type}",
attribute_name, collection, value_method, label_method, attribute_name, collection, value_method, label_method,
input_options, merged_input_options, input_options, merged_input_options,
&collection_block_for_nested_boolean_style &collection_block_for_nested_boolean_style