diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-09 13:25:10 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-09 13:25:10 +0000 |
commit | 96acbee6d3f85fd2826ca1c30b6cd703f7bed8a7 (patch) | |
tree | 29e55ea704636bc29d6af7f5b8f2638fd687d1f7 | |
parent | 7018f1aba8598ad64219308130a3f142543f965d (diff) | |
download | redmine-96acbee6d3f85fd2826ca1c30b6cd703f7bed8a7.tar.gz redmine-96acbee6d3f85fd2826ca1c30b6cd703f7bed8a7.zip |
use "do end" instead of {} at ActiveRecord scope lambda of app/models/query.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20317 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/query.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 5f69f56ac..44b3adca3 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -313,9 +313,9 @@ class Query < ActiveRecord::Base class_attribute :view_permission # Scope of queries that are global or on the given project - scope :global_or_on_project, lambda {|project| + scope :global_or_on_project, (lambda do |project| where(:project_id => (project.nil? ? nil : [nil, project.id])) - } + end) scope :sorted, lambda {order(:name, :id)} |