Skip to content

Commit

Permalink
fix financial links
Browse files Browse the repository at this point in the history
* mutltiple views did not work not sure if they did before
  • Loading branch information
mortbauer committed Feb 16, 2024
1 parent e0763cf commit a7290f7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/finance/financial_links_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def show
type: t('activerecord.models.bank_transaction'),
description: bt.text,
amount: bt.amount,
link_to: finance_bank_transaction_path(bt),
link_to: finance_bank_account_transaction_path(id:bt.id,bank_account_id:bt.bank_account.id),

Check failure on line 11 in app/controllers/finance/financial_links_controller.rb

View workflow job for this annotation

GitHub Actions / test

Layout/SpaceAfterColon: Space missing after colon.

Check failure on line 11 in app/controllers/finance/financial_links_controller.rb

View workflow job for this annotation

GitHub Actions / test

Layout/SpaceAfterComma: Space missing after comma.

Check failure on line 11 in app/controllers/finance/financial_links_controller.rb

View workflow job for this annotation

GitHub Actions / test

Layout/SpaceAfterColon: Space missing after colon.
remove_path: remove_bank_transaction_finance_link_path(@financial_link, bt)
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
%tbody
- @bank_transactions.each do |t|
%tr
%td= h link_to format_date(t.date), finance_bank_transaction_path(t)
%td= h link_to format_date(t.date), finance_bank_account_transaction_path(id:t.id)
%td= h(t.text).gsub("\n", "<br>").html_safe
%td= h(t.reference).gsub("\n", "<br>").html_safe
%td.numeric{style: 'width:5em'}= format_currency t.amount
Expand Down
4 changes: 2 additions & 2 deletions app/views/finance/bank_transactions/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

- unless @bank_transaction.receipt.blank?
%pre= preserve @bank_transaction.receipt
- if @bank_transaction.image
%p= image_tag @bank_transaction.image_url
-# - if @bank_transaction.image
-# %p= image_tag @bank_transaction.image_url
= link_to t('ui.or_cancel'), finance_bank_account_transactions_path(@bank_transaction.bank_account)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%tbody
- for t in @bank_transactions
%tr
%td= link_to format_time(t.date), add_bank_transaction_finance_link_path(@financial_link, bank_transaction: t.id), method: :put
%td= link_to format_date(t.date), add_bank_transaction_finance_link_path(@financial_link, bank_transaction: t.id), method: :put
%td= t.text
%td= t.reference
%td= number_to_currency t.amount
Expand Down

0 comments on commit a7290f7

Please sign in to comment.