From cccfe08eb5eab3b8570a866f8ebb83fec53ad093 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 20 May 2010 20:25:36 -0400 Subject: [PATCH] include body ID in asset JSON --- app/models/swf_asset.rb | 3 ++- spec/models/swf_asset_spec.rb | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/swf_asset.rb b/app/models/swf_asset.rb index 5f20b978..6244a933 100644 --- a/app/models/swf_asset.rb +++ b/app/models/swf_asset.rb @@ -19,7 +19,8 @@ class SwfAsset < ActiveRecord::Base { :id => id, :depth => depth, - :local_url => local_url + :local_url => local_url, + :body_id => body_id } end end diff --git a/spec/models/swf_asset_spec.rb b/spec/models/swf_asset_spec.rb index 52bf5e4a..e4c63bab 100644 --- a/spec/models/swf_asset_spec.rb +++ b/spec/models/swf_asset_spec.rb @@ -25,10 +25,12 @@ describe SwfAsset do asset = Factory.create :swf_asset, :id => 123, :zone_id => 1, + :body_id => 234, :url => 'http://images.neopets.com/cp/items/swf/000/000/012/12211_9969430b3a.swf' asset.as_json.should == { :id => 123, :depth => 12, + :body_id => 234, :local_url => 'http://impress.openneo.net/assets/swf/outfit/items/000/000/012/12211_9969430b3a.swf' } end