Skip to content
Snippets Groups Projects
Commit 99745822 authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

fix review creation

parent 1ee6b013
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ class Review < ApplicationRecord
has_many :rates
has_many :complaints, as: :complaintable
validates_presence_of :user, :reviewable, :review_ratings
validates_presence_of :user, :reviewable
validates_inclusion_of :reviewable_type, in: %w(LearningObject Collection), message: 'Only LearningObjects and Collections are reviewable.'
validates_uniqueness_of :user, scope: [:reviewable_id, :reviewable_type]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment