Skip to content

Commit d312a95

Browse files
authored
fix params in link, linting (#1458)
Release Notes Fix links from Accounts Receivable in the billing tab to properly redirect to All Transactions with the account prepopulated in the filter.
1 parent 407c0c9 commit d312a95

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/views/facility_accounts/accounts_receivable.html.haml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
= current_facility
33

44
= content_for :sidebar do
5-
= render :partial => 'admin/shared/sidenav_billing', :locals => { :sidenav_tab => "accounts_receivable" }
5+
= render "admin/shared/sidenav_billing", sidenav_tab: "accounts_receivable"
66

77
%h2= t(".head")
88

99
- if params[:show_all]
10-
= link_to t(".show_with_balance", :model => Account.model_name.human.pluralize.downcase), facility_accounts_receivable_path
10+
= link_to t(".show_with_balance", model: Account.model_name.human.pluralize.downcase), facility_accounts_receivable_path
1111
- else
12-
= link_to t(".show_all", :model => Account.model_name.human.pluralize.downcase), facility_accounts_receivable_path(:show_all => '1')
12+
= link_to t(".show_all", model: Account.model_name.human.pluralize.downcase), facility_accounts_receivable_path(show_all: "1")
1313

1414
%table.table.table-striped.table-hover
1515
%thead
@@ -28,8 +28,8 @@
2828
- balance[61] = a.facility_balance(current_facility, today - 61*24*60*60) - balance.values.inject{|sum, n| sum + n }
2929
- balance[31] = a.facility_balance(current_facility, today - 31*24*60*60) - balance.values.inject{|sum, n| sum + n }
3030
- balance[0] = a.facility_balance(current_facility, today) - balance.values.inject{|sum, n| sum + n }
31-
%tr{:class => (balance[91] > 0 ? "reconcile-warning" : "")}
32-
%td= link_to a, facility_transactions_path(current_facility, :accounts => [a.id])
31+
%tr{ class: (balance[91] > 0 ? "reconcile-warning" : "") }
32+
%td= link_to a, facility_transactions_path(current_facility, search: { accounts: [a.id] })
3333
%td.currency= number_to_currency(balance[0])
3434
%td.currency= number_to_currency(balance[31])
3535
%td.currency= number_to_currency(balance[61])

0 commit comments

Comments
 (0)