Interestings
Don’t Byte Me
If you’re looking at your code and realizing “I need this number in bytes, not MB so I can use Rails’s handy number_to_human_size helper”, don’t forget that the Numeric class is there to help!
5.megabytes => 5242880 == 5*1024*1024
number_to_human_size(5.megabytes) => “5 MB” == YAHTZEE!