<% content_for :head do %>
  <%= javascript_include_tag '/states' %>
<% end %>
<div id="checkout" data-hook>
  <h1><%= t(:checkout) %></h1>
  <%= checkout_progress %>
  <br clear="left" />
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
  <% if @order.state != 'confirm' %>
    <div id="checkout-summary" data-hook="checkout_summary_box">
      <%= render :partial => 'summary', :locals => { :order => @order } %>
    </div>
  <% end %>
  <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
    <%= render @order.state, :form => form %>
    <%= submit_tag nil, :id => 'post-final', :style => 'display:none;' %>
  <% end %>
</div>

<% content_for :head do %>
  <%= javascript_include_tag states_path %>
<% end %>
<div id="checkout" data-hook>
  <h1><%= t(:checkout) %></h1>
  <%= checkout_progress %>
  <br clear="left" />
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
  <% if @order.state != 'confirm' %>
    <div id="checkout-summary" data-hook="checkout_summary_box">
      <%= render :partial => 'summary', :locals => { :order => @order } %>
    </div>
  <% end %>
  <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
    <%= render @order.state, :form => form %>
    <%= submit_tag nil, :id => 'post-final', :style => 'display:none;' %>
  <% end %>
</div>

Fix invalid states.js path for Spree mounted at non-root.
Fix invalid states.js path for Spree mounted at non-root.

Fixes #929
