From 3faae36a12436ea51886e6f0363a6c0ed18d2856 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Mon, 10 Nov 2014 13:31:27 +0100 Subject: [PATCH] Qualify WorkPackage order scope with table name Signed-off-by: Alex Coles --- app/models/work_package.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/work_package.rb b/app/models/work_package.rb index ca8f3dc0fe..98643f97a6 100644 --- a/app/models/work_package.rb +++ b/app/models/work_package.rb @@ -69,7 +69,7 @@ class WorkPackage < ActiveRecord::Base scope :recently_updated, ->() { # Specified as a String due to https://github.com/rails/rails/issues/15405 # TODO: change to Hash on upgrade to Rails 4.1. - order('updated_at DESC') + order("#{WorkPackage.table_name}.updated_at DESC") } scope :visible, ->(*args) {