How do I empty a session object after rendering a specific path?
I have one view method in my controller:
def view
session[:storeid] = params[:id]
redirect_to products_path
end
I want to empty session[:storeid] after the products_path has been displayed.
Thanks in advance.
At the last line of the products_path view file add this code