Skip to content
Snippets Groups Projects
Commit 167bcccc authored by Douglas AC's avatar Douglas AC
Browse files

Passing "complaint_reason" alongside to the complaint in "show_related" request.

parent ff2b7a2f
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ class V1::ComplaintsController < ApplicationController
# GET /v1/complaints/1/show_related.json
def show_related
response = Complaint.where(complainable: @complaint.complainable, state: "complained")
render status: :ok, json: response
render status: :ok, json: response , :include => {:complaint_reason => {:except => [:updated_at, :created_at]}}
end
......
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