Verified Commit aba7a3cf authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

more explicit name for semester filters variable

parent 5fa6dbbf
......@@ -5,7 +5,7 @@ class BillingExpensesController < ApplicationController
def index
authorize BillingExpense
@billing_semesters = BillingExpense.generate_semester_filters
@billing_semester_filters = BillingExpense.generate_semester_filters
set_default_filter(semester: default_billing_semester)
@q = policy_scope(BillingExpense).ransack(params[:q])
@q.sorts = ['created_at desc'] if @q.sorts.empty?
......@@ -95,7 +95,7 @@ class BillingExpensesController < ApplicationController
end
def set_billing_semesters
@billing_semesters = BillingExpense.generate_semester_filters(:billable)
@billing_semester_filters = BillingExpense.generate_semester_filters(:billable)
end
def set_selection
......@@ -103,7 +103,7 @@ class BillingExpensesController < ApplicationController
end
def default_billing_semester
@billing_semesters.first[:value]
@billing_semester_filters.first[:value]
end
def selected_billing_semester
......
......@@ -10,7 +10,7 @@ h1
html: { class: 'form-ignore-changes', target: '_blank' } do |f|
ul.list-inline
li= clear_filter_button
= custom_filter_dropdown(t_attr(:semester, BillingExpense), *@billing_semesters)
= custom_filter_dropdown(t_attr(:semester, BillingExpense), *@billing_semester_filters)
li=> f.button :submit, 'Auswahl herunterladen', data: { disable_with: false }
li
- if @volunteer
......
......@@ -5,7 +5,7 @@ h1 Spesenformulare erfassen
ul.list-inline
= button_link navigation_glyph(:back), billing_expenses_path
li= clear_filter_button
= custom_filter_dropdown(t_attr(:semester, BillingExpense), *@billing_semesters)
= custom_filter_dropdown(t_attr(:semester, BillingExpense), *@billing_semester_filters)
= simple_form_for @billing_expense do |f|
= hidden_field_tag 'selected_semester', @selected_billing_semester
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment