Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Using “and” and “or” in Ruby.
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.
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 %>