This project is archived and is in readonly mode.
[PATCH] Make redirect_to accept a symbol following the convention used with render
-
Jamie Hill
- Assigned user set to José Valim
-
José Valim
- State changed from new to wontfix
- Importance changed from to Low
Hey Jamie, thanks for the patch but render and redirect_to have different semantics, they do not need to accept the same type of arguments. Besides, I usually prefer urls for redirection, it's more explicit. redirect_to :index is not as obvious as redirect_to posts_url.
Finally, the render "new" means: render the template named "new", notice you don't need to have an action in the controller. Although the render :action => "new" syntax may cause such confusion.
-
Jamie Hill
Okay, no problem. It's probably just me being lazy not wanting to type "redirect_to :action => 'my_action'" every time.
-
José Valim
Well, in Rails 3 you can easily include a module in ActionController base that handles it for you. :)
-
Jamie Hill
Will do, thanks.
