News for hackers. Stuff that matters.
Re:Using “and” and “or” in Ruby by sunkencity on Monday August 02, 2010 @03:43PM (#1568776)
Yeah I've looked briefly at and before and not gotten it's use, this is awesome.

In a similar vein it's possible to just hang on a rescue at the end, very practical and easy to read, like in a view:

<% percent = (count /total.to_f * 100 ).round_with_precision(2) rescue 0 %>

There are no comments on this comment yet.