From b7e0fc92f1771ed5f82219a41676f35836697251 Mon Sep 17 00:00:00 2001 From: Orban Botond Date: Sun, 31 May 2020 19:13:02 +0300 Subject: [PATCH] Get rid of ActiveSupport:TimeZoneWithSupport can't convert to String error The `first_entry.date` is an instance of `ActiveSupport:TimeZoneWithSupport`. I am going to convert it to Date to keep the compatibility. --- app/controllers/borutus/reports_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/borutus/reports_controller.rb b/app/controllers/borutus/reports_controller.rb index c11ed20..a82cb75 100644 --- a/app/controllers/borutus/reports_controller.rb +++ b/app/controllers/borutus/reports_controller.rb @@ -12,7 +12,7 @@ class ReportsController < ::Borutus::ApplicationController # GET /reports/balance_sheet def balance_sheet first_entry = Borutus::Entry.order('date ASC').first - @from_date = first_entry ? first_entry.date: Date.today + @from_date = first_entry ? first_entry.date.to_date: Date.today @to_date = params[:date] ? Date.parse(params[:date]) : Date.today @assets = Borutus::Asset.all @liabilities = Borutus::Liability.all