mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Scaffold out basic transactions model and UI (#478)
* Transaction scaffold * Rough in transaction views * Fix sort order * Fix mass assignment issue * Fix test * Simplify CI workflow * Don't seed db before test
This commit is contained in:
parent
e767aca37f
commit
87b97b3c41
26 changed files with 430 additions and 44 deletions
|
@ -3,6 +3,7 @@ class Account < ApplicationRecord
|
|||
belongs_to :family
|
||||
has_many :balances, class_name: "AccountBalance"
|
||||
has_many :valuations
|
||||
has_many :transactions
|
||||
|
||||
delegated_type :accountable, types: Accountable::TYPES, dependent: :destroy
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
class Family < ApplicationRecord
|
||||
has_many :users, dependent: :destroy
|
||||
has_many :accounts, dependent: :destroy
|
||||
has_many :transactions, through: :accounts
|
||||
end
|
||||
|
|
3
app/models/transaction.rb
Normal file
3
app/models/transaction.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
class Transaction < ApplicationRecord
|
||||
belongs_to :account
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue