Hi,

Rails 2.3.2

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
...

private
  def find_cart
     #session[:cart] ||= Cart.new
     session[:cart] = Cart.new  #<------********
  end

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:

http://localhost:3000/store

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
table:

rake db:rollback

and then doing:

db:migrate

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.

Thanks.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to