Sha256: b0f6a6028aa88c2bcb994eeea7023190a57aa9864d22ed7a09c0c91e37acb243

Contents?: true

Size: 271 Bytes

Versions: 156

Compression:

Stored size: 271 Bytes

Contents

class User < ActiveRecord::Base
  has_many :projects
  has_many :contributions
  has_many :credit_cards
  has_one :user_total
  has_one :bank_account

  accepts_nested_attributes_for :bank_account

  def credits
    user_total.present? ? user_total.credits : 0
  end
end

Version data entries

156 entries across 156 versions & 1 rubygems

Version Path
catarse_pagarme-2.9.13 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.12 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.11 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.10 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.9 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.8 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.7 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.6 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.5 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.4 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.3 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.2 spec/dummy/app/models/user.rb
catarse_pagarme-2.9.0 spec/dummy/app/models/user.rb
catarse_pagarme-2.8.10 spec/dummy/app/models/user.rb
catarse_pagarme-2.8.9 spec/dummy/app/models/user.rb
catarse_pagarme-2.8.8 spec/dummy/app/models/user.rb
catarse_pagarme-2.8.7 spec/dummy/app/models/user.rb
catarse_pagarme-2.8.6 spec/dummy/app/models/user.rb
catarse_pagarme-2.8.5 spec/dummy/app/models/user.rb
catarse_pagarme-2.8.4 spec/dummy/app/models/user.rb