summaryrefslogtreecommitdiffstats
path: root/app/models/custom_field.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-10 11:10:47 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-10 11:10:47 +0000
commit36ecb821b89c01e523155b0998769d006853e3fd (patch)
treef4720123cc1f43f76f53a8f214539c2cc117a9ef /app/models/custom_field.rb
parent8303dac21c29c5c7ca8e605405864fd02a9dc1b3 (diff)
downloadredmine-36ecb821b89c01e523155b0998769d006853e3fd.tar.gz
redmine-36ecb821b89c01e523155b0998769d006853e3fd.zip
use "do end" instead of {} at ActiveRecord scope lambda of app/models/custom_field.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20331 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r--app/models/custom_field.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index 24ad6049c..06005031e 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -50,7 +50,7 @@ class CustomField < ActiveRecord::Base
end
scope :sorted, lambda {order(:position)}
- scope :visible, lambda {|*args|
+ scope :visible, (lambda do |*args|
user = args.shift || User.current
if user.admin?
# nop
@@ -64,7 +64,7 @@ class CustomField < ActiveRecord::Base
else
where(:visible => true)
end
- }
+ end)
def visible_by?(project, user=User.current)
visible? || user.admin?
end