Sha256: 8ad9af9d8e8594a8cf52316f3dd0c5725c5b883c908bcabe606d00595b76cfaf

Contents?: true

Size: 373 Bytes

Versions: 4

Compression:

Stored size: 373 Bytes

Contents

class ClientFinancialTransaction < ActiveRecord::Base
  # NOTE: This whole thing is kind of a hack...
  # We're not a *real* model, we're just an ActiveRecord class around a view thats useful 
  self.table_name = 'client_finance_transactions'

  belongs_to :client

  def amount
    Money.new read_attribute(:amount_in_cents).to_i
  end

  def readonly?
    true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
brisk-bills-0.8.2 app/models/client_financial_transaction.rb
brisk-bills-0.8.1 app/models/client_financial_transaction.rb
brisk-bills-0.7.0 app/model_views/client_financial_transaction.rb
brisk-bills-0.6.0 app/model_views/client_financial_transaction.rb