Add uniqueness validation for votes
This commit is contained in:
parent
b2e6c1b701
commit
b9cb0804ef
2 changed files with 21 additions and 0 deletions
|
|
@ -6,6 +6,8 @@ class Vote < ApplicationRecord
|
|||
|
||||
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
|
||||
|
||||
validates :event, uniqueness: { scope: :user }
|
||||
|
||||
delegate :name, to: :user
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue