fixes exception when sending email about comment reply

This commit is contained in:
rgarcia
2017-10-10 16:01:20 +02:00
parent b95dc572c5
commit 89f81bf7a4
2 changed files with 53 additions and 0 deletions

View File

@@ -27,6 +27,10 @@ class Poll < ActiveRecord::Base
scope :sort_for_list, -> { order(:geozone_restricted, :starts_at, :name) }
def title
name
end
def current?(timestamp = Date.current.beginning_of_day)
starts_at <= timestamp && timestamp <= ends_at
end