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
118f23dc
Commit
118f23dc
authored
6 years ago
by
Douglas AC
Browse files
Options
Downloads
Patches
Plain Diff
Fixing user methods called
parent
d075434d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/v1/complaints_controller.rb
+4
-4
4 additions, 4 deletions
app/controllers/v1/complaints_controller.rb
with
4 additions
and
4 deletions
app/controllers/v1/complaints_controller.rb
+
4
−
4
View file @
118f23dc
...
...
@@ -65,7 +65,7 @@ class V1::ComplaintsController < ApplicationController
# POST v1/complaints/1/reject
# POST v1/complaints/1/reject.json
def
reject
@complaint
.
reject!
@complaint
.
reject
ed
!
@complaint
.
complainable
.
complaint_reject
(
complaint_answer_params
[
:option
])
response
=
{
'status'
:
'complaint rejected'
}
render
status: :ok
,
json:
response
...
...
@@ -74,14 +74,14 @@ class V1::ComplaintsController < ApplicationController
# POST v1/complaints/1/accept
# POST v1/complaints/1/accept.json
def
accept
@complaint
.
accept!
@complaint
.
accept
ed
!
@complaint
.
complainable
.
complaint_accept
(
complaint_answer_params
[
:option
])
response
=
{
'status'
:
'complaint accepted'
}
render
status: :ok
,
json:
response
end
# POST /v1/complaints/1/
show
_related
# POST /v1/complaints/1/
show
_related.json
# POST /v1/complaints/1/
treat
_related
# POST /v1/complaints/1/
treat
_related.json
def
treat_related
parameters
=
complaint_answer_params
user
=
User
.
find
(
params
[
:id
])
...
...
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