I am trying to do something like this :
session[:continent][:filter] = params[:filter]
but it doesn't work, i got this error :
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]=
You need to initialise session[:continent] to be a Hash first. Try this:
session[:continent] ||= {}
session[:continent][:filter] = params[:filter]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With