fix receiving invoices on Rails 3