Ok, Now as I've made session[:cart_ids] and array with:

session[:cart_ids] ||= []

how can I clear all the stored ids in the session coz 
'session[:cart_ids] = nil' isn't working. Also as I have ids in the 
array referenced by session[:cart_ids] and that the carts table only 
stored the camp location, to get the id of each camp location stored in 
the cart, I'm doing:

@cart=Cart.find(session[:cart_ids])

for item in @cart
 @camp_id=Campsite.find(:all, :conditions => ['camp_location = 
?',item.campsite])
 Booking.create(......,:camp_id => @camp_id.id)
end

But, it doesn't seem to work. Any better way? plz suggest me.. 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