On Jul 23, 9:07 am, Zhenning Guan
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> I don''t know what exactly raise work for. it seem redirect_to has
the
> same functionality. well, I know I must be missed something. so anyone
> show some examples?
redirect_to makes rails generate an http redirect response (which
tells the browser to fetch another url instead)
raise raises an exception. The two are completely unrelated.
If you meant render rather than redirect_to, then the difference is
that render just renders a template - there is no redirection.
Fred> --
> Posted viahttp://www.ruby-forum.com/.