Skip to content
Snippets Groups Projects
Commit 917c903d authored by lmtd21's avatar lmtd21
Browse files

Issue #24: FIX delete users and learning objects

parent f90574d5
No related branches found
No related tags found
1 merge request!24Issue #24: FIX delete users and learning objects
Pipeline #32087 failed
......@@ -69,7 +69,7 @@ class Collection < ApplicationRecord
validates_inclusion_of :privacy, in: %w(public private), message: 'Privacy must be public or private'
after_create :create_action
before_destroy :delete_index
#before_destroy :delete_index
scope :from_user, ->(user) { where(owner: user) }
......
......@@ -92,7 +92,7 @@ class LearningObject < ApplicationRecord
validates :language, unless: :draft?, :length => { :minimum => 1 }
validates :id_dspace, presence: true, uniqueness: true, unless: :published?
before_destroy :delete_index
#before_destroy :delete_index
validates :terms_of_service, acceptance: true, unless: :draft?
......
......@@ -140,7 +140,7 @@ class User < ApplicationRecord
before_save :verify_teacher_id
after_save :verify_dspace_info
before_create :send_email_confirmation
before_destroy :delete_index
#before_destroy :delete_index
after_update :create_actions
has_attached_file :avatar, styles: { medium: '300x300>', thumb: '60x60>' }, default_url: ''
......
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