I'm trying to use the following:
class PaymentsController < ApplicationController
def addproduct
(session[:products] ||= []) << params[:item]
redirect_to :back
end
end
I got this exception:
undefined method `back_url' for #<PaymentsController:0x007ff682c467a8>
Why this is happening?