I'm following along with the examples in AWDWR (3rd), and around about
p. 103, where you are working with a session table you created, I
decided to free lance a bit. At some point, I tried to "clear" the
session by doing the following:
class StoreController < ApplicationController
#session[:cart] ||= Cart.new
session[:cart] = Cart.new #<------********
I figured that would "erase" the old cart, and let me continue with a
new, empty cart. However, everything is completely messed up now, and
when I try to access a "store page" (which lists the products for sale)
using the following url:
I get an error page that says:
We're sorry but something went wrong.
We've been notified about this issue and
we will take a look at it shortly.
As a fix, I tried rolling back the migration that created the session
and then doing:
but I get that same error page. So I'm stuck. So much for free
lancing. Is there some obvious way I can get rid of that error page and
get sessions working again.
Alternatively, I have git installed and I committed my changes at the
end of the last chapter(p. 96). But I've read several git tutorials,
and I can't figure out how to rollback to a previous version of my code.