Changed return to current day

This commit is contained in:
Luiz F Picolo 2021-10-08 21:54:36 -04:00
parent 10f853453b
commit cfce177d00

View File

@ -6,11 +6,11 @@ ActiveRecord::Base.default_timezone = :local
class Rate < ActiveRecord::Base class Rate < ActiveRecord::Base
def self.get_download def self.get_download
all.collect { |p| [p.created_at.strftime('%d/%m %H:%M'), p.download] } where(created_at: Date.today.all_day).collect { |p| [p.created_at.strftime('%d/%m %H:%M'), p.download] }
end end
def self.get_upload def self.get_upload
all.collect { |p| [p.created_at.strftime('%d/%m %H:%M'), p.upload] } where(created_at: Date.today.all_day).collect { |p| [p.created_at.strftime('%d/%m %H:%M'), p.upload] }
end end
def self.save def self.save