So, in new
> create
actions the user is redirected to Controller#Show
. You can just pass a parameter along with it. For Eg you can modify your redirect_to
to something like the following:
<%= redirect_to show_path(:param1 => "true") %>
Then in your #Show
page, you can check
<% if !params[:param1].nil? and params[:param1] == true %>
<%= link_to "OK", root_path %>
<% else %>
<%= link_to "OK", :back %>
<% end %>