summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-10 11:09:54 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-10 11:09:54 +0000
commit3a0b7d6a2f03d80abcde82269dd0abe40993fb69 (patch)
treea88c4360f19bea84ead38b160d8991f649a4c4a3 /app/models
parent8d8a49cee08fb7e3448d6e205a0a5e680a68adec (diff)
downloadredmine-3a0b7d6a2f03d80abcde82269dd0abe40993fb69.tar.gz
redmine-3a0b7d6a2f03d80abcde82269dd0abe40993fb69.zip
remove spaces inside {} of app/models/role.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20324 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/role.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/role.rb b/app/models/role.rb
index bd3c0662d..7d0f65b43 100644
--- a/app/models/role.rb
+++ b/app/models/role.rb
@@ -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