I have a form on the rails view that passes data to a page that will be a summary page of a shopping cart.
When I send data to the next page, it is transmitted as follows from the output of the console.
"team"=>{"team_name"=>"Joe Blogs", "email"=>" joe@bloggs.com ", "player1"=>" 3", "player2"=>"4", "player3"=>"5"}
I want to save this data as a session variable, namely as a hash, so if another command is sent to the summary page, I can add it to the session as another hash record. those. team [1], team [2]. Then I can access the command [1] .team_name, etc. And use it accordingly.
In conclusion, I want the user to be able to fill out the form and put it in the basket. Then they can come back and do the same. Finally, they can look at their cart and delete any records they donβt want, empty the trash or send them to the database.
I cannot figure out how to do this or if it is possible.
Any solutions or suggestions on how to implement this?
source share