forked from OpenNeo/impress
10 lines
335 B
Ruby
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
|