what is equiv of RequestDispatcher.forward in Rails

4 views
Skip to first unread message

vijay

unread,
Sep 11, 2006, 6:42:43 PM9/11/06
to rubyonra...@googlegroups.com

what is equiv of java servlet's RequestDispatcher.forward in Rails?

Regards,

vj

--
Posted via http://www.ruby-forum.com/.

DHH

unread,
Sep 11, 2006, 9:05:54 PM9/11/06
to Ruby on Rails: Talk
> what is equiv of java servlet's RequestDispatcher.forward in Rails?

Within the same controller, you can just call that method. But in
general, it's considered poor style to use internal redirects. It makes
the URLs ambivalent, makes it harder to do stuff like page caching, and
it's usually entirely unnecessary. Instead, just do redirect_to and be
happy.

David Heinemeier Hansson

Reply all
Reply to author
Forward
0 new messages