Formatting US dollars with Ruby
This was surprisingly hard to find, so I thought I would post it here. This line will format a number as US dollars, including commas. In a Rails view, you can just use number_to_currency, but in straight-up Ruby, you can do this:
Just another reminder for me that I need to brush up on regular expressions.