# Redirect\_to vs render

**URL:** <https://rubytalk.org/t/redirect-to-vs-render/48154>\
**Category:** ruby-talk\
**Created:** [6 August 2008 10:34 UTC](https://rubytalk.org/t/redirect-to-vs-render/48154 "2008-08-06T10:34:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Palani\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Palani\_Kumar](https://rubytalk.org/u/Palani_Kumar)\
**Post date:** [6 August 2008 10:34 UTC](https://rubytalk.org/t/redirect-to-vs-render/48154/1 "2008-08-06T10:34:36Z")

</div>

Can any one explain me what is the difference between redirect\_to and  
render.I am newbie. i am bit confuesd about those two.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Stefan\_Lang1](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Stefan\_Lang1](https://rubytalk.org/u/Stefan_Lang1)\
**Post date:** [6 August 2008 12:05 UTC](https://rubytalk.org/t/redirect-to-vs-render/48154/2 "2008-08-06T12:05:36Z")

</div>

redirect\_to generates a response that, instead of delivering  
content to the browser, just tells it to request another url.

render causes rails to generate a response whose content  
is produced by rendering one of your templates.

So redirect\_to is just telling the browser "hey, the stuff you're  
looking for is not here, it's over there!" while render is actually  
delivering content.

It would be better to post Rails specific questions to  
rubyonrails-talk ([http://groups.google.com/group/rubyonrails-talk\](http://groups.google.com/group/rubyonrails-talk%5C)).

Stefan

> **···**
>
> 2008/8/6 Palani Kumar \<palani.apk@gmail.com\>:
> 
> > Can any one explain me what is the difference between redirect\_to and  
> > render.I am newbie. i am bit confuesd about those two.
