I've put some code like this
flash[:task_loader] = flash[:task_loader]
flash[:task_loader_params] = flash[:task_loader_params]
in a function in my controller which all my actions can call. This has the effect of keeping those two flash entries in the FlashHash
. (I presume odd-looking code works because the '=' does more than just assign values.)
My question is, is there a better way to do this? Something like
flash[:task_loader].pin