Open itkin opened 8 years ago
Hello,
:collection option expects a [value, label] array whereas simple_form (and rails options_for_select helper) expect [label, value]
:collection
[value, label]
simple_form
options_for_select
[label, value]
Pretty disturbing, may we change line 25 of helper.rb ? I propose to remove it since it overrides display_with/display_as options
helper.rb
display_value = collection.flat_map{|a| a[0].to_s == value ? a[1] : nil }.compact[0] #for display_value = collection.flat_map{|a| a[1].to_s == value ? a[0] : nil }.compact[0]
Thanks for your great gem !
Hello,
:collection
option expects a[value, label]
array whereassimple_form
(and railsoptions_for_select
helper) expect[label, value]
Pretty disturbing, may we change line 25 of
helper.rb
? I propose to remove it since it overrides display_with/display_as optionsThanks for your great gem !