Q:

Access old get parameters in URL after a post request

I have a form in RoR with a controller action that looks up a record via the get parameter. 
def respond 
  if request.post? 
    # Submit logic here...

    # cannot lookup this way to fill the form out again 
    # @current_message = Saved_message.find_by_id(params[:msg_id])
  elsif request.get? 
    @current_message = Saved_message.find_by_id(params[:msg_id])
  end
end

I can't use the params[:msg_id] to lookup the message again because it's a post request and I don't resend the get parameters. However, the get parameters remain in the url such as .../messages/respond?msg_id=2. I can get around this by passing in a hidden field with a different parameter name like <%= form.hidden_field :msg_id_2, value: params[:msg_id] %>. Then I can lookup the @current_message via the params[:msg_id_2]. However, I don't like this solution. Any advice to access the now inaccessible get parameter? 

A:

you should use RESTful routes so that you do not have to care about such issues.
since you are not posting much about the actual code or problem you are trying to solve, i can just assume what might be the issue here and how to solve it.

