<commit_before>class Donation < ActiveRecord::Base
  belongs_to :member
  belongs_to :petition
  belongs_to :referral
  attr_accessible :member, :petition, :referral, :amount
  validates_presence_of :petition, :member, :referral

  def self.confirm_payment(amount, hash)
    donor = Member.find_by_hash(hash)
    donation = Donation.where(:member_id => donor, :amount => nil).last
    donation.update_attributes(:amount => amount)

  end

end<commit_msg>removes ws<commit_after>class Donation < ActiveRecord::Base
  belongs_to :member
  belongs_to :petition
  belongs_to :referral
  attr_accessible :member, :petition, :referral, :amount
  validates_presence_of :petition, :member, :referral

  def self.confirm_payment(amount, hash)
    donor = Member.find_by_hash(hash)
    donation = Donation.where(:member_id => donor, :amount => nil).last
    donation.update_attributes(:amount => amount)
  end

end
{'fraction_non_alphanumeric': 0.10398230088495575, 'fraction_numerical': 0.0, 'mean_word_length': 5.328671328671328, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5682806', 'n_tokens_mistral': 301, 'n_tokens_neox': 292, 'n_words': 64}