about summary refs log tree commit diff stats
path: root/app/models/vote.rb
blob: e2d83866bdb8446fe847034129f28850e6875bef (plain) (blame)
1
2
3
4
5
6
class Vote < ApplicationRecord
  belongs_to :votable, polymorphic: true

  validates :upvote, presence: true, inclusion: { in: [0, 1] }
  validates :ip, presence: true
end