forked from OpenNeo/impress
item zone sets jsonp controller
This commit is contained in:
parent
a0a1a94e96
commit
4ba6af20ad
4 changed files with 14 additions and 0 deletions
5
app/controllers/item_zone_sets_controller.rb
Normal file
5
app/controllers/item_zone_sets_controller.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class ItemZoneSetsController < ApplicationController
|
||||||
|
def index
|
||||||
|
render :json => Zone::ItemZoneSets.keys.sort.as_json, :callback => params[:callback]
|
||||||
|
end
|
||||||
|
end
|
2
app/helpers/item_zone_sets_helper.rb
Normal file
2
app/helpers/item_zone_sets_helper.rb
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
module ItemZoneSetsHelper
|
||||||
|
end
|
|
@ -8,4 +8,6 @@ OpenneoImpressItems::Application.routes.draw do |map|
|
||||||
match '/pet_types/:pet_type_id/swf_assets.json' => 'swf_assets#index', :as => :pet_type_swf_assets
|
match '/pet_types/:pet_type_id/swf_assets.json' => 'swf_assets#index', :as => :pet_type_swf_assets
|
||||||
|
|
||||||
match '/species/:species_id/color/:color_id/pet_type.json' => 'pet_types#show'
|
match '/species/:species_id/color/:color_id/pet_type.json' => 'pet_types#show'
|
||||||
|
|
||||||
|
match '/item_zone_sets.js' => 'ItemZoneSets#index'
|
||||||
end
|
end
|
||||||
|
|
5
spec/controllers/item_zone_sets_controller_spec.rb
Normal file
5
spec/controllers/item_zone_sets_controller_spec.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe ItemZoneSetsController do
|
||||||
|
|
||||||
|
end
|
Loading…
Reference in a new issue