diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-13 14:44:58 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-14 13:17:31 +0200 |
commit | cfbfb86730719f31e42a1a177a05e1745dde934b (patch) | |
tree | e238744418245b68f2ef8a4bf57ed46c7f275f40 /actionpack | |
parent | 4c2bbe9a1abfefacda71764ad583c0a302b1fc4e (diff) | |
download | rails-cfbfb86730719f31e42a1a177a05e1745dde934b.tar.gz rails-cfbfb86730719f31e42a1a177a05e1745dde934b.tar.bz2 rails-cfbfb86730719f31e42a1a177a05e1745dde934b.zip |
removing a lolinject
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_options_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index ee34452769..3c4d0b65f4 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -300,12 +300,12 @@ module ActionView container = container.to_a if Hash === container selected, disabled = extract_selected_and_disabled(selected) - options_for_select = container.inject([]) do |options, element| + options_for_select = container.map do |element| html_attributes = option_html_attributes(element) text, value = option_text_and_value(element) selected_attribute = ' selected="selected"' if option_value_selected?(value, selected) disabled_attribute = ' disabled="disabled"' if disabled && option_value_selected?(value, disabled) - options << %(<option value="#{html_escape(value.to_s)}"#{selected_attribute}#{disabled_attribute}#{html_attributes}>#{html_escape(text.to_s)}</option>) + %(<option value="#{html_escape(value.to_s)}"#{selected_attribute}#{disabled_attribute}#{html_attributes}>#{html_escape(text.to_s)}</option>) end options_for_select.join("\n").html_safe |