Replace blame gem (not working with Rails 3.2) with custom code