On 12/23/05, John MccLain
<jmcclain-RI2jYlfFOOy2dUpmj6OxPQC/G2K4zDHf@public.gmane.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.