From 34f408b55245e941204093420b2e4fea94aa2160 Mon Sep 17 00:00:00 2001 From: Zanz2 Date: Tue, 11 Sep 2018 10:34:05 +0200 Subject: [PATCH] refactored serializers, removed attributes --- app/serializers/api/v1/experiment_serializer.rb | 3 +-- app/serializers/api/v1/my_module_group_serializer.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/serializers/api/v1/experiment_serializer.rb b/app/serializers/api/v1/experiment_serializer.rb index db9c0dd7e..b1ef9023e 100644 --- a/app/serializers/api/v1/experiment_serializer.rb +++ b/app/serializers/api/v1/experiment_serializer.rb @@ -4,8 +4,7 @@ module Api module V1 class ExperimentSerializer < ActiveModel::Serializer type :experiments - attributes :id, :name, :description, :project_id, :created_by_id, - :archived, :created_at, :updated_at + attributes :id, :name, :description, :created_by_id, :archived end end end diff --git a/app/serializers/api/v1/my_module_group_serializer.rb b/app/serializers/api/v1/my_module_group_serializer.rb index 0ec8e2dca..4a1d5c46b 100644 --- a/app/serializers/api/v1/my_module_group_serializer.rb +++ b/app/serializers/api/v1/my_module_group_serializer.rb @@ -4,7 +4,7 @@ module Api module V1 class MyModuleGroupSerializer < ActiveModel::Serializer type :task_groups - attributes :id, :created_at, :updated_at, :created_by_id, :experiment_id + attributes :id, :created_by_id, :experiment_id belongs_to :experiment, serializer: ExperimentSerializer end end