Reputation: 1654
I want to fill session with many ids. How to create a session with many contents like an array?
example :
session[:store_id] = []
session[:store_id] << store.id
I get a result like this if I add many ids to my session :
session[:store_id] << 1
=> result : [1]
session[:store_id] << 2
=> result : [2]
I expect a result like this :
session[:store_id] = [1,2,3,4,5]
How do I do that?
Upvotes: 0
Views: 443