In fact, if you sent something with a redirect, you passed it as a GET parameter. In this case, you can access them from the params
hash.
If you redirect, for example:
redirect_to :controller => 'users', :action => 'edit', :id => 1, :param_a => 1, :param_b => 2
You have a url:
http://localhost:3000/users/1/edit?param_a=1¶m_b=2
Thus, you can access :param_a
and :param_b
in your view from the parameter hash:
<%= params[:param_a] %> <%= params[:param_b] %>
source share