<% content_for :head do %>
  <%= javascript_include_tag states_url %>
<% end %>
<div id="checkout" data-hook>  
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
  
  <div class="row" data-hook="checkout_header">
    <h1 class="columns three alpha" data-hook="checkout_title"><%= t(:checkout) %></h1>
    <div class="columns thirteen omega" data-hook="checkout_progress"><%= checkout_progress %></div>
  </div>
  
  <div class="row" data-hook="checkout_content">
    <div class="columns <%= if @order.state != 'confirm' then 'alpha twelve' else 'alpha omega sixteen' end %>" data-hook="checkout_form_wrapper">
      <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
        <%= render @order.state, :form => form %>
      <% end %>
    </div>    
    <% if @order.state != 'confirm' %>
      <div id="checkout-summary" data-hook="checkout_summary_box" class="columns omega four">
        <%= render :partial => 'summary', :locals => { :order => @order } %>
      </div>
    <% end %>
  </div>

</div>

<% content_for :head do %>
  <%= javascript_include_tag states_url(:format => :js) %>
<% end %>
<div id="checkout" data-hook>  
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
  
  <div class="row" data-hook="checkout_header">
    <h1 class="columns three alpha" data-hook="checkout_title"><%= t(:checkout) %></h1>
    <div class="columns thirteen omega" data-hook="checkout_progress"><%= checkout_progress %></div>
  </div>
  
  <div class="row" data-hook="checkout_content">
    <div class="columns <%= if @order.state != 'confirm' then 'alpha twelve' else 'alpha omega sixteen' end %>" data-hook="checkout_form_wrapper">
      <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
        <%= render @order.state, :form => form %>
      <% end %>
    </div>    
    <% if @order.state != 'confirm' %>
      <div id="checkout-summary" data-hook="checkout_summary_box" class="columns omega four">
        <%= render :partial => 'summary', :locals => { :order => @order } %>
      </div>
    <% end %>
  </div>

</div>

Add .js extension to request for States controller's javascript in spree/checkout/edit view
Add .js extension to request for States controller's javascript in spree/checkout/edit view

Fixes issue where some clients (or proxies) can cause Rails to infer the response type from the format of the URL rather than the Accept header (malformed headers?).  Since unqualified URLs default to HTML, the States controller issues a 406 Not Acceptable error since it can only respond to :js.

Fixes #1659
