forked from OpenNeo/impress
include body ID in asset JSON
This commit is contained in:
parent
8411d4c64a
commit
cccfe08eb5
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue