Methods

Made several methods for User and Project models
You can also use an ActiveRecord helper and do it like this:
self.pledges.sum(:amount)