I am trying to accomplish the following, but with a session variable (ie., ‘session[:dynamically_named]’), rather than an instance variable. This is how I see it can be done with an instance variable:
instance_variable_set("@#{params[:key]}", params[:val])
Seeing how there doesn’t seem to be a “session_variable_set”, how can this be done, even with some alternative work around with a session variable?
You set values on
sessionlike you would with an ordinary Hash, e.g.: