# Process request and redirect to another url with all params

**URL:** <https://www.ruby-forum.com/t/process-request-and-redirect-to-another-url-with-all-params/169272>\
**Category:** Rails\
**Created:** [June 1, 2009, 7:29pm UTC](https://www.ruby-forum.com/t/process-request-and-redirect-to-another-url-with-all-params/169272 "2009-06-01T19:29:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug3](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@doug3](https://www.ruby-forum.com/u/doug3)\
**Post date:** [June 1, 2009, 7:29pm UTC](https://www.ruby-forum.com/t/process-request-and-redirect-to-another-url-with-all-params/169272/1 "2009-06-01T19:29:57Z")

</div>

I am trying to do the following:  
process a request containing form data. Once I my app has successfully  
completed its processing, I would like to redirect\_to a totally  
different site and pass along the parameters that came in with the  
original request.

This is how I am currently handling it in the controller:

[code=]def create  
@subscription = Subscription.new(params[:subscription])

```
  @subscription.user_id = current_user.id

  @subscription.subscribe

  respond_to do |format|

      if @subscription.save
        parms2 = params

        format.html {redirect_to

```

“[http://www.someothersite.com/process](http://www.someothersite.com/process)”,parms2}  
else  
#handle the problem  
end  
end

```
  end[/code]

```

Everything up to the redirect is happening correctly. Then I am  
redirected to [www.someothersite.com](http://www.someothersite.com) but it is behaving as though the  
parms2 are missing. I am new to Ruby and Rails and am probably missing  
something very easy here.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![doug3](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@doug3](https://www.ruby-forum.com/u/doug3)\
**Post date:** [June 1, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/process-request-and-redirect-to-another-url-with-all-params/169272/2 "2009-06-01T19:59:31Z")

</div>

The key issue here is that this will need to be send as a POST request,  
whereas I assume the default of redirect\_to is GET.

You will have to put the params onto to the end of the url string  
yourself, eg.

param1=this&param2=16&param3=that
