Skip to content
Snippets Groups Projects
Commit 619bf2aa authored by Matheus Agio Nerone's avatar Matheus Agio Nerone
Browse files

adding topics validation


Signed-off-by: default avatarman13 <man13@inf.ufpr.br>
parent 24c3233c
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ class LearningObject < ActiveRecord::Base
belongs_to :object_type
belongs_to :attachment, class_name: 'LearningObject::Attachment'
validates_presence_of :name, :publisher, :object_type, :language, :author
validates_presence_of :name, :publisher, :object_type, :language, :author, :topics
validates :id_dspace, presence: true, uniqueness: true, unless: :is_draft?
default_scope { includes(:object_type, :attachment, :attachments).order(score: :desc) }
......
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