06 Aug 2009, 17:45
Generic-user-small

Barry Mccall (4 posts)

After Chapter 8 in the playtime there is this code here ‘session[:counter].’ I know that session is basically a map with key data pairs, but why is ‘:counter’ being passed in as a key? Or even better where does it come from? Previously we used the session like so: session[:id]. ‘:id’ was passed to the add_to_cart function from index.html.erb so I understand that. But how does ‘:counter’ get passed to the index function in the model?

Thanks

  You must be logged in to comment