From 94e80edc9bae59eb173b80c2c92eb5a863430e3f Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Sun, 7 Oct 2018 10:16:00 +0200 Subject: [PATCH] Minor variable rename in task_groups_controller.rb --- app/controllers/api/v1/task_groups_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/v1/task_groups_controller.rb b/app/controllers/api/v1/task_groups_controller.rb index f586c2664..c94a73865 100644 --- a/app/controllers/api/v1/task_groups_controller.rb +++ b/app/controllers/api/v1/task_groups_controller.rb @@ -9,17 +9,17 @@ module Api before_action :load_task_group, only: :show def index - my_module_groups = @experiment.my_module_groups + task_groups = @experiment.my_module_groups .page(params.dig(:page, :number)) .per(params.dig(:page, :size)) incl = params[:include] == 'tasks' ? :tasks : nil - render jsonapi: my_module_groups, + render jsonapi: task_groups, each_serializer: TaskGroupSerializer, include: incl end def show - render jsonapi: @my_module_group, + render jsonapi: @task_group, serializer: TaskGroupSerializer, include: :tasks end @@ -46,7 +46,7 @@ module Api end def load_task_group - @my_module_group = @experiment.my_module_groups.find( + @task_group = @experiment.my_module_groups.find( params.require(:id) ) end