title: undefined method `model_name' for nil:NilClass for simple form
body: <p>I have this weird error coming suddenly, previously I was able to submit the data from one form to another .. I could not figure out what is going wrong. Any help will be appreciated.</p>
  
  <p>Here is the view </p>
  
  <pre><code>&lt;div class="choose-occasion"&gt;
      &lt;div class="col-md-12"&gt;
          &lt;center&gt;
          &lt;img class="steps-img" src="/assets/choose-occasion/step-1.png"&gt;
          &lt;/center&gt;
      &lt;/div&gt;
      &lt;div class="col-md-12"&gt;
          &lt;h3 class="heading-text"&gt;choose an occasion&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="container"&gt;
      &lt;%= simple_form_for @order, url: wizard_path,:method =&gt; :put do |f| %&gt;
          &lt;center&gt;
              &lt;%= f.collection_select :occasion_id, Occasion.all, :id, :name, {},{:class=&gt; 'selectpicker btn-group'} %&gt;
          &lt;/center&gt;
          &lt;input type="hidden" value="&lt;%= spree_current_user.id %&gt;" name="studio_order[user_id]" &gt;
          &lt;center&gt;
                  &lt;%= button_tag(type: "submit", class: "btn btn-primary continue-btn") do %&gt;
                       Continue
                       &lt;%= image_tag("choose-occasion/greater.png", class: "gmark") %&gt;
                  &lt;% end %&gt;
          &lt;/center&gt;
          &lt;% end %&gt;
      &lt;/div&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p>Here is the controller ..</p>
  
  <pre><code>class OrderDetailsController &lt; ApplicationController
      include Wicked::Wizard
  
      steps :choose_occasion, :choose_style, :number_of_people, :choose_package, :upload_images, :instructions_artist
  
      def show
          byebug
          @order = StudioOrder.new 
          render_wizard 
      end
  
  
      def update
          byebug
          if StudioOrder.find_by(user_id: spree_current_user.id)
              @order = StudioOrder.find_by(user_id: spree_current_user.id)
              @order.update_attributes(getparams)
          end
  
          render_wizard @order
      end
  
      def getparams
          params.require(:studio_order).permit(:user_id, :occasion_id, :style_id,:initial_price, :number_of_people,
              :artwork_size, :package_id, :instructions)
      end
  end
  </code></pre>
  
  <p>Here are the params going in </p>
  
  <pre><code>{"utf8"=&gt;"✓", "_method"=&gt;"put", "authenticity_token"=&gt;"A64h4cyTdOuZji/2zSvr7K/WE3SZt2UMMP8bitsdY6c5Z2EA02qlJx/SKzE7yZT4lRMFPi8sDpJzSOi9m9NkLQ==", "studio_order"=&gt;{"occasion_id"=&gt;"1", "user_id"=&gt;"2"}, "button"=&gt;"", "controller"=&gt;"order_details", "action"=&gt;"update", "id"=&gt;"choose_occasion"}
  </code></pre>