<script>
  if (Spree === undefined) {
    var Spree = {}
  }
  if (Spree.routes == undefined) {
    Spree.routes = {}
  }
  Spree.routes.states_search = "<%= spree.api_states_path(:format => 'json') %>"
  Spree.routes.apply_coupon_code = function(order_id) {
    return "<%= spree.api_orders_path %>/" + order_id + "/apply_coupon_code"
  }
</script>


<script>
  if (Spree === undefined) {
    var Spree = {}
  }
  if (Spree.routes == undefined) {
    Spree.routes = {}
  }
  Spree.routes.states_search = "<%= spree.api_states_path(:format => 'json') %>"
  Spree.routes.apply_coupon_code = function(order_id) {
    return "<%= spree.api_orders_path %>/" + order_id + "/apply_coupon_code"
  }
  Spree.routes.root = "<%= spree.root_url if spree.respond_to? :root_url %>"
</script>

Set up a Spree.routes.root property via js
Set up a Spree.routes.root property via js

Provide the application a global accessor for the root path in js as
stores are not always mounted on the root domain "/"

Conflicts:
	core/app/views/spree/shared/_routes.html.erb
