mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-13 15:26:32 +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
|
before_action :load_task_group, only: :show
|
||||||
|
|
||||||
def index
|
def index
|
||||||
my_module_groups = @experiment.my_module_groups
|
task_groups = @experiment.my_module_groups
|
||||||
.page(params.dig(:page, :number))
|
.page(params.dig(:page, :number))
|
||||||
.per(params.dig(:page, :size))
|
.per(params.dig(:page, :size))
|
||||||
incl = params[:include] == 'tasks' ? :tasks : nil
|
incl = params[:include] == 'tasks' ? :tasks : nil
|
||||||
render jsonapi: my_module_groups,
|
render jsonapi: task_groups,
|
||||||
each_serializer: TaskGroupSerializer,
|
each_serializer: TaskGroupSerializer,
|
||||||
include: incl
|
include: incl
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
render jsonapi: @my_module_group,
|
render jsonapi: @task_group,
|
||||||
serializer: TaskGroupSerializer,
|
serializer: TaskGroupSerializer,
|
||||||
include: :tasks
|
include: :tasks
|
||||||
end
|
end
|
||||||
|
@ -46,7 +46,7 @@ module Api
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_task_group
|
def load_task_group
|
||||||
@my_module_group = @experiment.my_module_groups.find(
|
@task_group = @experiment.my_module_groups.find(
|
||||||
params.require(:id)
|
params.require(:id)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue