mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 23:59:40 +02:00
Basic trade and holdings view (#1271)
* Add trade view * Lint fix * Fix stale placeholder variable * Add holding view
This commit is contained in:
parent
f5cb13b42f
commit
4bfe47540d
25 changed files with 387 additions and 68 deletions
|
@ -2,7 +2,7 @@ class Account::HoldingsController < ApplicationController
|
|||
layout :with_sidebar
|
||||
|
||||
before_action :set_account
|
||||
before_action :set_holding, only: :show
|
||||
before_action :set_holding, only: %i[show destroy]
|
||||
|
||||
def index
|
||||
@holdings = @account.holdings.current
|
||||
|
@ -11,6 +11,11 @@ class Account::HoldingsController < ApplicationController
|
|||
def show
|
||||
end
|
||||
|
||||
def destroy
|
||||
@holding.destroy_holding_and_entries!
|
||||
redirect_back_or_to account_holdings_path(@account)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue