title: Shopify App causing return code 302
body: <p>I have this piece of code which is triggered when a new order is created in my Shopify store:</p>
  
  <pre><code>class CustomwebhooksController &lt; ShopifyApp::WebhooksController 
    #the line below is to avoid the CSR error
    protect_from_forgery with: :null_session, if: Proc.new { |c| c.request.format == 'application/json' }
  
    include ShopifyApp::WebhookVerification
  
    # This method is triggered when the user completes the checkout process
    # Gets the order number and see the message "Your order is confirmed" 
    # I should use this as the trigger to update the other SKU for the DT solution:
    def orders_create
      request.body.rewind
      data = JSON.parse(request.body.read)
  
      #redirect_to controller: "home", action: "update_stock", status: :found
  
      @MyHomeController = HomeController.new
      @MyHomeController.update_stock
  
      #do not remove line below
      head :ok
  
    end
  
  end
  </code></pre>
  
  <p>This is the code in my home controller:</p>
  
  <pre><code>class HomeController &lt; ShopifyApp::AuthenticatedController
    def update_stock
      @products = ShopifyAPI::Product.find(:all, :params =&gt; {:title =&gt; 'DT382'})
      @products.each do |product|
        puts(product.id)
      end  
    end      
  end
  </code></pre>
  
  <p>Somehow the call to <code>@MyHomeController.update_stock</code> generates a 302 as shown below:</p>
  
  <p>Rendered inline template (0.4ms)
    Completed 302 Found in 689ms (Views: 0.9ms | ActiveRecord: 0.0ms)</p>
  
  <p>Am I missing anything?</p>