From 492841d9bc2c1ffba36e21507d524cf4c31e88aa Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 22 Feb 2011 18:11:12 -0500 Subject: [PATCH] load happy pets for item db previews --- app/controllers/swf_assets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/swf_assets_controller.rb b/app/controllers/swf_assets_controller.rb index e86a331a..e00587d8 100644 --- a/app/controllers/swf_assets_controller.rb +++ b/app/controllers/swf_assets_controller.rb @@ -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