use lambda form in Version model scope (#12499)
git-svn-id: http://svn.redmine.org/redmine/trunk@12486 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
73b27124f1
commit
e17bf40fe1
@ -203,7 +203,7 @@ class Version < ActiveRecord::Base
|
|||||||
["(CASE WHEN #{table}.effective_date IS NULL THEN 1 ELSE 0 END)", "#{table}.effective_date", "#{table}.name", "#{table}.id"]
|
["(CASE WHEN #{table}.effective_date IS NULL THEN 1 ELSE 0 END)", "#{table}.effective_date", "#{table}.name", "#{table}.id"]
|
||||||
end
|
end
|
||||||
|
|
||||||
scope :sorted, order(fields_for_order_statement)
|
scope :sorted, lambda { order(fields_for_order_statement) }
|
||||||
|
|
||||||
# Returns the sharings that +user+ can set the version to
|
# Returns the sharings that +user+ can set the version to
|
||||||
def allowed_sharings(user = User.current)
|
def allowed_sharings(user = User.current)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user