From: Toshi MARUYAMA Date: Sun, 11 Oct 2020 12:57:00 +0000 (+0000) Subject: shorten long line of app/models/user_preference.rb X-Git-Tag: 4.2.0~680 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=25bd274b0e0eabb24618897ba94df11d05e85628;p=redmine.git shorten long line of app/models/user_preference.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20137 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 2a0efb7f9..3a8723111 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -109,7 +109,10 @@ class UserPreference < ActiveRecord::Base end def toolbar_language_options=(value) - languages = value.to_s.delete(' ').split(',').select{|lang| Redmine::SyntaxHighlighting.language_supported?(lang) }.compact + languages = + value.to_s.delete(' ').split(',').select do |lang| + Redmine::SyntaxHighlighting.language_supported?(lang) + end.compact self[:toolbar_language_options] = languages.join(',') end