title: Undefined local variable or method `current_submission' for #<OrdersController:0x000000056a6a30>
body: <p>I am trying to create an app for managing an academic conference. Users will sign in and submit abstracts for consideration of being presented at our annual conference. I have followed the "Ruby on Rails 3 Tutorial" for most of what I have done. My modifications include adding a Submission model, a Registration model, and an Order model. The Submission model belongs_to the User model and has_one order. </p>
  
  <p>I am trying to follow the Railscast 145/146 episodes about integrating PayPal Express checkout using ActiveMerchant. My goal is to put a PayPal checkout button on the submissions show.html.erb page so that after the author has submitted his abstract he can pay the submission fee right away. </p>
  
  <p>The error arises from the following code after I have submitted the order:</p>
  
  <pre><code>class OrdersController &lt; InheritedResources::Base
  
    def new
      @order = Order.new
    end
  
    def create
      @order = current_submission.orders.build_order(params[:order])
  
      @order.ip_address = request.remote_ip
      if @order.save
  
        # flash[:notice] = "Successfully created order."
        #redirect_to orders_url
      else
        render :action =&gt; 'new'
      end
    end
  end
  </code></pre>
  
  <p>From what I have read, I think the problem has to do with how orders are related to submissions. Each submission should have a related order entry, so in the Order table there should be a submission_id. I am really confused about how this works. </p>
  
  <p>Could someone please point me in the right direction? Is there a user guide that you would recommend that I read? There seems to be a lot of conflicting information out there between the different versions of Rails. I am using Rails 3.0.10.</p>
  
  <p>Thanks!</p>