There isn't much point in writing code after a render/redirect in a
controller method, and it's safe to say it's a best practice not to. I
think the main reason render/redirect work the way they do is to make
it easier to use those methods in before/after_filters.

For what it's worth, Merb's render/redirect implementation is what you
suggest here.

On Mon, Feb 8, 2010 at 14:04, Ralph Shnelvar <[email protected]> wrote:
> Ok, I think I understand why RoR will flag an attempt double render in
> an action.
>
> What I don't understand is the philosophy of render and redirect_to.
>
> Specifically, why isn't a return implicit in both those methods?
>
> Or, I guess, more to the point ... what are the advantages of writing
> code in the action after a render/redirect_to?
> --
> Posted via http://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.
>
>

-- 
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.

Reply via email to