Truncate votes api timestamp to hour

This commit is contained in:
Alberto Miedes Garcés
2017-01-02 12:00:58 +01:00
parent 508360cfa5
commit f4e0ef7eea
3 changed files with 15 additions and 4 deletions

View File

@@ -10,4 +10,8 @@ class Vote < ActsAsVotable::Vote
def public_voter
User.select("gender, geozone_id, date_of_birth").where(id: self.voter_id).first
end
def public_timestamp
self.created_at.change(min: 0)
end
end