From a4feee89b53d122625cdb70f22cef7feb955c8d8 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 4 Aug 2011 10:04:15 -0400 Subject: [PATCH] allow the new items migration to run. sigh --- app/models/item.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/item.rb b/app/models/item.rb index 7d5f2de8..03c8675e 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -38,7 +38,7 @@ class Item < ActiveRecord::Base "LEFT JOIN #{SwfAsset.table_name} sa ON sa.type = 'object' AND sa.id = psa.swf_asset_id" ).where('sa.id IS NULL') - scope :newest, order(arel_table[:created_at].desc) + scope :newest, order(arel_table[:created_at].desc) if arel_table[:created_at] scope :spidered_longest_ago, order(["(#{Item.arel_table[:last_spidered].eq(nil).to_sql}) DESC", arel_table[:last_spidered].desc])