]> source.dussan.org Git - redmine.git/commitdiff
remove spaces inside {} of app/models/role.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 10 Nov 2020 11:09:54 +0000 (11:09 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 10 Nov 2020 11:09:54 +0000 (11:09 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20324 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/role.rb

index bd3c0662d6a11382ca1834abaad58d849007fa74..7d0f65b4367b59fd96929fce9667e53da2b6a071 100644 (file)
@@ -53,8 +53,8 @@ class Role < ActiveRecord::Base
     ['members_of_visible_projects', :label_users_visibility_members_of_visible_projects]
   ]
 
-  scope :sorted, lambda { order(:builtin, :position) }
-  scope :givable, lambda { order(:position).where(:builtin => 0) }
+  scope :sorted, lambda {order(:builtin, :position)}
+  scope :givable, lambda {order(:position).where(:builtin => 0)}
   scope :builtin, lambda { |*args|
     compare = (args.first == true ? 'not' : '')
     where("#{compare} builtin = 0")
@@ -117,7 +117,7 @@ class Role < ActiveRecord::Base
   end
 
   def permissions=(perms)
-    perms = perms.collect {|p| p.to_sym unless p.blank? }.compact.uniq if perms
+    perms = perms.collect {|p| p.to_sym unless p.blank?}.compact.uniq if perms
     write_attribute(:permissions, perms)
   end
 
@@ -136,7 +136,7 @@ class Role < ActiveRecord::Base
     return unless permissions.is_a?(Array)
 
     permissions_will_change!
-    perms.each { |p| permissions.delete(p.to_sym) }
+    perms.each {|p| permissions.delete(p.to_sym)}
     save!
   end