1
0
Fork 0
forked from OpenNeo/impress

allow the new items migration to run. sigh

This commit is contained in:
Emi Matchu 2011-08-04 10:04:15 -04:00
parent d99a1ad792
commit a4feee89b5

View file

@ -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])