When would I use a render and when would I use a redirect_to? It seems that a redirect_to would be so much more common, but there has been an emphasis on rendering in rails John McClain Senior Software Engineer TCS Healthcare email@example.com (530)886-1700x235 "Skepticism is the first step toward truth"
on 2005-12-24 00:49
on 2005-12-24 03:25
On 12/23/05, John MccLain <firstname.lastname@example.org> wrote: > > When would I use a render and when would I use a redirect_to? It seems that > a redirect_to would be so much more common, but there has been an emphasis > on rendering in rails > render() means "User got to the right place, and now it's time to generate HTML for them to display." redirect_to() means "We can't handle things in this action/controller, so we're telling the user's browser to go elsewhere." Put another way, render() produces results without changing the URL displayed in the client browser, redirect_to() sends them elsewhere. --Wilson.