Em 19-12-2011 23:56, Steve Klabnik escreveu:
throw/catch for flow control is bad.
raise-rescue is intended for exception handling, while catch-throw is
intended for regular control flow in Ruby.
Another possible syntax would be redirect_to and render returning an
object that would respond
raise-rescue is intended for exception handling, while catch-throw is
intended for regular control flow in Ruby.
Right. There's a reason you don't see it often in Ruby code bases.
It's slow, hard to understand, and just generally a bad idea.
--
You received this message because you are
Em 20-12-2011 10:59, Steve Klabnik escreveu:
raise-rescue is intended for exception handling, while catch-throw is
intended for regular control flow in Ruby.
Right. There's a reason you don't see it often in Ruby code bases.
It's slow, hard to understand, and just generally a bad idea.
Let me
From a web application point of view, you're usually done after you
deliver some content to the client, which in Rails means a render or
redirect call usually.
For 99.99% of the cases, there'll be a return following a render or
redirect inside some if.
Some might prefer something like
throw/catch for flow control is bad.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Core group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to
Nope, I think the current way of doing things is just fine.
On 20/12/2011, at 9:51, Rodrigo Rosenfeld Rosas rr.ro...@gmail.com wrote:
From a web application point of view, you're usually done after you deliver
some content to the client, which in Rails means a render or redirect call
On Mon, Dec 19, 2011 at 11:56 PM, Steve Klabnik st...@steveklabnik.com wrote:
throw/catch for flow control is bad.
Indeed it is. It's the one thing in Sinatra I always disliked.
If I had to choose, I would go down the path of render/redirect
returning a response, so you would do something like
Yehuda Katz
(ph) 718.877.1325
2011/12/19 Nicolás Sanguinetti h...@nicolassanguinetti.info
On Mon, Dec 19, 2011 at 11:56 PM, Steve Klabnik st...@steveklabnik.com
wrote:
throw/catch for flow control is bad.
Indeed it is. It's the one thing in Sinatra I always disliked.
If I had to choose,