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 firstname.lastname@example.org (530)886-1700x235 "Skepticism is the first step toward truth"
on 2005-12-24 01:49
on 2005-12-24 04:25
On 12/23/05, John MccLain <email@example.com> 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.