]> source.dussan.org Git - redmine.git/commitdiff
shorten long line of app/models/user_preference.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 11 Oct 2020 12:57:00 +0000 (12:57 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 11 Oct 2020 12:57:00 +0000 (12:57 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20137 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/user_preference.rb

index 2a0efb7f95f854ae0f85df0118536fc77a1690a3..3a87231111c18dabcbe684f2eec8b49f5e88c3ec 100644 (file)
@@ -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