Change validation scope and Fix tests
This commit is contained in:
parent
b9cb0804ef
commit
9fdd372f18
2 changed files with 3 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ class Vote < ApplicationRecord
|
|||
|
||||
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
|
||||
|
||||
validates :event, uniqueness: { scope: :user }
|
||||
validates :user_id, uniqueness: { scope: :event_id }
|
||||
|
||||
delegate :name, to: :user
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue