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 to 'and_return', like:
redirect_to(login_path).and_return unless authenticated?
This reads much better than "return render ..." and is also backward
compatible...
--
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 [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-core?hl=en.