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
Harbor 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
824d8af8
Commit
824d8af8
authored
9 months ago
by
Richard Fernando Heise Ferreira
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/63-fix-comments' into 'develop'
issue
#63
: fix comments Closes
#63
See merge request rfhf19/cleanning-portalmec!57
parents
4e1f446d
007e9272
Branches
Branches containing commit
No related tags found
1 merge request
!57
issue #63: fix comments
Pipeline
#38723
failed
9 months ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/review.rb
+3
-1
3 additions, 1 deletion
app/models/review.rb
with
3 additions
and
1 deletion
app/models/review.rb
+
3
−
1
View file @
824d8af8
...
@@ -52,7 +52,9 @@ class Review < ApplicationRecord
...
@@ -52,7 +52,9 @@ class Review < ApplicationRecord
validates_presence_of
:user
,
:reviewable
validates_presence_of
:user
,
:reviewable
validates_inclusion_of
:reviewable_type
,
in:
%w(LearningObject Collection)
,
message:
'Only LearningObjects and Collections are 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
]
# users should be able to comment multiple times
# validates_uniqueness_of :user, scope: [:reviewable_id, :reviewable_type]
accepts_nested_attributes_for
:review_ratings
accepts_nested_attributes_for
:review_ratings
...
...
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