diff options
author | Go MAEDA <maeda@farend.jp> | 2018-08-02 21:54:21 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-08-02 21:54:21 +0000 |
commit | eee1c36b4b7f0cee23ebc5d3848fa2b606f603c8 (patch) | |
tree | 6618b8113ac99e4feb65ffbab90f87bc5da10349 /app/controllers | |
parent | c76a021e92e77036152935ac19af10893f56669f (diff) | |
download | redmine-eee1c36b4b7f0cee23ebc5d3848fa2b606f603c8.tar.gz redmine-eee1c36b4b7f0cee23ebc5d3848fa2b606f603c8.zip |
Replace Enumerable#sort with faster Enumerable#sort_by (#29299).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17462 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/settings_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index f4109571f..9985fa6ea 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -46,7 +46,7 @@ class SettingsController < ApplicationController end @options = {} - user_format = User::USER_FORMATS.collect{|key, value| [key, value[:setting_order]]}.sort{|a, b| a[1] <=> b[1]} + user_format = User::USER_FORMATS.collect{|key, value| [key, value[:setting_order]]}.sort_by{|f| f[1]} @options[:user_format] = user_format.collect{|f| [User.current.name(f[0]), f[0].to_s]} @deliveries = ActionMailer::Base.perform_deliveries |