1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-20 07:21:12 +00:00

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
This commit is contained in:
Toshi MARUYAMA 2020-11-09 13:25:10 +00:00
parent 7018f1aba8
commit 96acbee6d3

View File

@ -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)}