I am trying to set cookie name dynamically in my rails application.
I am able to set cookie like this:
cookies[:users_id] = current_user.id
I want to set the cookie name dynamically. I tried like this and it's not working:
cookies[:'users_id_#{current_user.id}'] = current_user.id
How is it possible?