forked from OpenNeo/impress
load happy pets for item db previews
This commit is contained in:
parent
8ff6c5ad9c
commit
492841d9bc
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ class SwfAssetsController < ApplicationController
|
|||
pet_state_id = params[:pet_state_id].to_i
|
||||
json = @swf_assets.map { |a| a.as_json(:parent_id => pet_state_id, :for => 'wardrobe') }
|
||||
elsif params[:pet_type_id]
|
||||
@swf_assets = PetType.find(params[:pet_type_id]).pet_states.first.swf_assets
|
||||
@swf_assets = PetType.find(params[:pet_type_id]).pet_states.emotion_order.first.swf_assets
|
||||
end
|
||||
json ||= @swf_assets ? @swf_assets.all : nil
|
||||
render :json => json
|
||||
|
|
Loading…
Reference in a new issue