title: Undefined local variable or method with respond_with (Ruby on Rails)
body: <p>I have problem with matcher respond_with. My error (500 Internar server error) is undefined local variable or method `orders'. This is my method in <strong>OrdersController</strong>:</p>
  
  <pre><code>respond_to :json, :html
         ...
    def create
      order = meal.create_order(order_params)
      respond_with orders
    end
  </code></pre>
  
  <p>My <strong>routes:</strong></p>
  
  <pre><code>resources :orders, only: [:index, :create, :destroy], defaults: {format: :json} do
    member do
      put '/delivered' =&gt; 'orders#delivered'
    end
  end
  </code></pre>
  
  <p>What is wrong with that code?</p>