1
0
Fork 0
forked from OpenNeo/impress
impress/app/controllers/swf_assets_controller.rb

10 lines
335 B
Ruby

class SwfAssetsController < ApplicationController
def index
if params[:item_id]
@swf_assets = Item.find(params[:item_id]).swf_assets.for_json.all
elsif params[:pet_type_id]
@swf_assets = PetType.find(params[:pet_type_id]).pet_states.first.swf_assets.for_json.all
end
render :json => @swf_assets
end
end