Stats was not returning supports for the current day

This commit is contained in:
Juan Salvador Pérez García
2018-06-21 15:07:53 +02:00
parent e1ac6bfa01
commit 7018c0fe45

View File

@@ -31,7 +31,7 @@ class ProposalSupportsQuery
end
def votes
Vote.where(votable: proposal, created_at: start_date..end_date).order(created_at: :asc)
Vote.where(votable: proposal, created_at: start_date.beginning_of_day..end_date.end_of_day).order(created_at: :asc)
end
def proposal