diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-09-24 15:42:02 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-09-24 15:42:02 +0000 |
commit | fe6b965fd5d9e2f3d7f346b53f6762ce5433e402 (patch) | |
tree | 28bb75e8187bbb95e81e1830bc335e69df0c9f41 /config | |
parent | e83313240f38dc222923821be057312d5924a966 (diff) | |
download | redmine-fe6b965fd5d9e2f3d7f346b53f6762ce5433e402.tar.gz redmine-fe6b965fd5d9e2f3d7f346b53f6762ce5433e402.zip |
code cleanup: rubocop: fix Rails/Presence in config/initializers/10-patches.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18520 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/10-patches.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index e0559903b..9af59563e 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -97,7 +97,7 @@ module ActionView alias :options_for_select_without_non_empty_blank_option :options_for_select def options_for_select(container, selected = nil) if container.is_a?(Array) - container = container.map {|element| element.blank? ? [" ".html_safe, ""] : element} + container = container.map {|element| element.presence || [" ".html_safe, ""]} end options_for_select_without_non_empty_blank_option(container, selected) end |