diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-07 07:51:15 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-07 07:51:15 +0000 |
commit | e17bf40fe1eddafdb456c4068eb60e02ecf17394 (patch) | |
tree | dd70f40be9354ea79023e8ca2accde880746c45d /app/models/version.rb | |
parent | 73b27124f1d5c25531a1d397f0fbdae9d6d51635 (diff) | |
download | redmine-e17bf40fe1eddafdb456c4068eb60e02ecf17394.tar.gz redmine-e17bf40fe1eddafdb456c4068eb60e02ecf17394.zip |
use lambda form in Version model scope (#12499)
git-svn-id: http://svn.redmine.org/redmine/trunk@12486 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |