Class: CompletionKit::Api::V1::ResponsesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/completion_kit/api/v1/responses_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
# File 'app/controllers/completion_kit/api/v1/responses_controller.rb', line 8

def index
  scope = @run.responses.includes(:reviews)
  scope = scope.where(status: params[:status]) if params[:status].present?
  render json: paginate(scope.order(:id))
end

#showObject



14
15
16
# File 'app/controllers/completion_kit/api/v1/responses_controller.rb', line 14

def show
  render json: @response
end