From 82c2ff6206c87482e0a1d4bd82c60c9a3fe02b66 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 20 May 2010 21:23:24 -0400 Subject: [PATCH] ensure that we are only selecting biology assets when we want biology assets, objects when objects, etc --- app/models/swf_asset_parent.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/swf_asset_parent.rb b/app/models/swf_asset_parent.rb index 3d69f337..dc840054 100644 --- a/app/models/swf_asset_parent.rb +++ b/app/models/swf_asset_parent.rb @@ -7,6 +7,6 @@ module SwfAssetParent select(rels[:swf_asset_id]). all.map(&:swf_asset_id) assets = SwfAsset.arel_table - SwfAsset.where(assets[:id].in(ids)) + SwfAsset.where(assets[:id].in(ids).and(assets[:type].eq(type))) end end