mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Minor variable rename in task_groups_controller.rb
This commit is contained in:
parent
f56e5b1e5a
commit
94e80edc9b
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue