Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure that spree/states#index returns javascript response

  • Loading branch information...
commit 2ed646a821c7dd86ac1f4c4ab4190cc93b366663 1 parent 9a1234f
@cyu cyu authored cyu committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 core/app/controllers/spree/states_controller.rb
View
4 core/app/controllers/spree/states_controller.rb
@@ -2,6 +2,8 @@ module Spree
class StatesController < BaseController
ssl_allowed :index
+ respond_to :js
+
def index
# table of {country.id => [ state.id , state.name ]}, arrays sorted by name
# blank is added elsewhere, if needed
@@ -11,6 +13,8 @@ def index
Spree::State.order('name ASC').each { |state|
@state_info[state.country_id.to_s].push [state.id, state.name]
}
+
+ respond_with(@state_info)
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.