From 5a25c32b2f9e7eff5b7c54088ecbf9b6b098709f Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Mon, 6 Jul 2015 12:35:57 +0200 Subject: [PATCH] Revert "Work-around WorkPackage nested set errors on PG" This issue should be fixed in our Rails 4(.1)-compatible fork of awesome_nested_set. See: https://github.com/finnlabs/awesome_nested_set/commit/7bd473e845e2f17f5287e8b7534bd88d4bbbf7d6 This reverts commit 2ea2c776e34ad81fe90e03ca3791fd1a6e7064af. --- app/models/work_package.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/models/work_package.rb b/app/models/work_package.rb index a66b73a163..0627a57b38 100644 --- a/app/models/work_package.rb +++ b/app/models/work_package.rb @@ -69,13 +69,6 @@ class WorkPackage < ActiveRecord::Base attr_protected :project_id, :author_id, :lft, :rgt # <<< issues.rb <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - # HACK: remove on upgrade to awesome_nested_set 3. - # Active Record 4 will, by default, order by id: - # ORDER BY "work_packages"."id" ASC LIMIT 1 - # this results in the following genre of errors on PostgreSQL: - # …it is not contained in either an aggregate function or the GROUP BY clause - default_scope { order('') } - 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.