main #4

Merged
oat merged 68 commits from :main into main 2022-12-03 14:59:04 +01:00
1 changed files with 1 additions and 0 deletions
Showing only changes of commit f17fc5742e - Show all commits

View File

@ -85,6 +85,7 @@ class Poll < ApplicationRecord
def reset_votes!
self.cached_tallies = options.map { 0 }
self.votes_count = 0
self.voters_count = 0
votes.delete_all unless new_record?
end