Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
917c903d
Commit
917c903d
authored
2 years ago
by
lmtd21
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#24
: FIX delete users and learning objects
parent
f90574d5
No related branches found
No related tags found
1 merge request
!24
Issue #24: FIX delete users and learning objects
Pipeline
#32087
failed
2 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/models/collection.rb
+1
-1
1 addition, 1 deletion
app/models/collection.rb
app/models/learning_object.rb
+1
-1
1 addition, 1 deletion
app/models/learning_object.rb
app/models/user.rb
+1
-1
1 addition, 1 deletion
app/models/user.rb
with
3 additions
and
3 deletions
app/models/collection.rb
+
1
−
1
View file @
917c903d
...
...
@@ -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
)
}
...
...
This diff is collapsed.
Click to expand it.
app/models/learning_object.rb
+
1
−
1
View file @
917c903d
...
...
@@ -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?
...
...
This diff is collapsed.
Click to expand it.
app/models/user.rb
+
1
−
1
View file @
917c903d
...
...
@@ -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:
''
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment