Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .standard_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
ignore:
- app/controllers/api/v1/base_controller.rb:
- Rails/LexicallyScopedActionFilter
- app/controllers/casa_cases_controller.rb:
- Rails/TimeZone
- Style/EmptyStringInsideInterpolation
- app/controllers/case_contacts/followups_controller.rb:
- Layout/EmptyLineAfterGuardClause
- app/controllers/case_contacts_controller.rb:
Expand All @@ -22,8 +19,6 @@ ignore:
- Layout/EmptyLinesAfterModuleInclusion
- app/controllers/other_duties_controller.rb:
- Layout/EmptyLineAfterGuardClause
- app/controllers/reimbursements_controller.rb:
- Rails/TimeZone
- app/controllers/users/sessions_controller.rb:
- Layout/EmptyLinesAfterModuleInclusion
- Rails/LexicallyScopedActionFilter
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/casa_cases_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def show
send_data csv, filename: case_contact_csv_name(case_contacts)
end
format.xlsx do
filename = @casa_case.case_number + "-case-contacts-" + Time.now.strftime("%Y-%m-%d") + ".xlsx"
filename = @casa_case.case_number + "-case-contacts-" + Time.zone.now.strftime("%Y-%m-%d") + ".xlsx"
response.headers["Content-Disposition"] = "attachment; filename=#{filename}"
end
end
Expand Down Expand Up @@ -256,9 +256,9 @@ def set_contact_types

def case_contact_csv_name(case_contacts)
casa_case_number = case_contacts&.first&.casa_case&.case_number
current_date = Time.now.strftime("%Y-%m-%d")
current_date = Time.zone.now.strftime("%Y-%m-%d")

"#{casa_case_number.nil? ? "" : casa_case_number + "-"}case-contacts-#{current_date}.csv"
"#{casa_case_number + "-" unless casa_case_number.nil?}case-contacts-#{current_date}.csv"
end

def court_date_unknown?
Expand Down
Loading