Class: Transaction
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Transaction
- Includes:
- ActiveModel::Validations
- Defined in:
- app/models/transaction.rb
Instance Method Summary collapse
Instance Method Details
#create_contract ⇒ Object
22 23 24 |
# File 'app/models/transaction.rb', line 22 def create_contract Contract.create(blk_transaction: self) end |
#receiver ⇒ Object
18 19 20 |
# File 'app/models/transaction.rb', line 18 def receiver Wallet.find_by(pr_key: receiver_key).user.username end |
#sender ⇒ Object
14 15 16 |
# File 'app/models/transaction.rb', line 14 def sender Wallet.find_by(pv_key: sender_key).user.username end |