title: rails redirect_to :back not working
body: <p>I'm trying to use the following:</p>
  
  <pre><code>class PaymentsController &lt; ApplicationController
  
    def addproduct
       (session[:products] ||= []) &lt;&lt; params[:item]
       redirect_to :back
    end
  
   end
  </code></pre>
  
  <p>I got this exception: </p>
  
  <pre><code>undefined method `back_url' for #&lt;PaymentsController:0x007ff682c467a8&gt;
  </code></pre>
  
  <p>Why this is happening?</p>