From 96acbee6d3f85fd2826ca1c30b6cd703f7bed8a7 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 9 Nov 2020 13:25:10 +0000 Subject: [PATCH] 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 --- app/models/query.rb | 4 ++-- 1 file 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)} -- 2.39.5