class Poll < ActiveRecord::Base
    validates :title, presence: true
    validates :main_question, length: { maximum: 140 }
    validates :valid_until, presence: true

    belongs_to :user
    has_many :answers, dependent: :destroy
    acts_as_votable
    acts_as_commentable
    mount_uploader :image, Uploader
end
