Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ink-api
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alex Theg
ink-api
Commits
cbe66374
Commit
cbe66374
authored
7 years ago
by
charlie-ablett
Browse files
Options
Downloads
Patches
Plain Diff
Remove some comments
parent
e1c18cac
No related branches found
Branches containing commit
Tags
1.1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/recipe.rb
+0
-6
0 additions, 6 deletions
app/models/recipe.rb
with
0 additions
and
6 deletions
app/models/recipe.rb
+
0
−
6
View file @
cbe66374
...
...
@@ -51,14 +51,8 @@ class Recipe < ApplicationRecord
destroy
else
if
account
!=
current_entity
.
account
ap
"Does it belong to this user?
#{
current_entity
.
account
.
email
}
"
ap
account
!=
current_entity
.
account
raise
RuntimeError
.
new
(
"Can't destroy this recipe - it is not yours"
)
elsif
(
process_chains
.
map
(
&
:account_id
)
-
[
current_entity
.
account
.
id
]).
any?
ap
"Does it have process chains not belonging to them?"
ap
process_chains
.
map
(
&
:account_id
)
ap
(
process_chains
.
map
(
&
:account_id
)
-
[
current_entity
.
account
.
id
])
ap
(
process_chains
.
map
(
&
:account_id
)
-
[
current_entity
.
account
.
id
]).
any?
raise
RuntimeError
.
new
(
"Can't delete this recipe, because it has process chains that aren't yours."
)
else
destroy
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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