refactored serializers, removed attributes

This commit is contained in:
Zanz2 2018-09-11 10:34:05 +02:00
parent c2d62667e4
commit 34f408b552
2 changed files with 2 additions and 3 deletions

View file

@ -4,8 +4,7 @@ module Api
module V1 module V1
class ExperimentSerializer < ActiveModel::Serializer class ExperimentSerializer < ActiveModel::Serializer
type :experiments type :experiments
attributes :id, :name, :description, :project_id, :created_by_id, attributes :id, :name, :description, :created_by_id, :archived
:archived, :created_at, :updated_at
end end
end end
end end

View file

@ -4,7 +4,7 @@ module Api
module V1 module V1
class MyModuleGroupSerializer < ActiveModel::Serializer class MyModuleGroupSerializer < ActiveModel::Serializer
type :task_groups 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 belongs_to :experiment, serializer: ExperimentSerializer
end end
end end