mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
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
This commit is contained in:
parent
e83313240f
commit
fe6b965fd5
@ -959,7 +959,6 @@ Rails/Presence:
|
||||
- 'app/controllers/activities_controller.rb'
|
||||
- 'app/helpers/application_helper.rb'
|
||||
- 'app/models/repository.rb'
|
||||
- 'config/initializers/10-patches.rb'
|
||||
- 'config/initializers/30-redmine.rb'
|
||||
- 'lib/redmine/codeset_util.rb'
|
||||
- 'lib/redmine/i18n.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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user