On Jul 23, 9:07 am, Zhenning Guan <[email protected]>
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/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---