From e17bf40fe1eddafdb456c4068eb60e02ecf17394 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 7 Jan 2014 07:51:15 +0000 Subject: [PATCH] use lambda form in Version model scope (#12499) git-svn-id: http://svn.redmine.org/redmine/trunk@12486 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/version.rb b/app/models/version.rb index 8e5e5364a..09b21d8e9 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -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"] 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 def allowed_sharings(user = User.current)