mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 15:31: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:
parent
7018f1aba8
commit
96acbee6d3
@ -313,9 +313,9 @@ class Query < ActiveRecord::Base
|
|||||||
class_attribute :view_permission
|
class_attribute :view_permission
|
||||||
|
|
||||||
# Scope of queries that are global or on the given project
|
# 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]))
|
where(:project_id => (project.nil? ? nil : [nil, project.id]))
|
||||||
}
|
end)
|
||||||
|
|
||||||
scope :sorted, lambda {order(:name, :id)}
|
scope :sorted, lambda {order(:name, :id)}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user