scinote-web/app/serializers/api/v1/my_module_serializer.rb

13 lines
326 B
Ruby
Raw Normal View History

2018-09-05 15:55:04 +08:00
# frozen_string_literal: true
module Api
module V1
class MyModuleSerializer < ActiveModel::Serializer
type :tasks
2018-09-13 15:25:16 +08:00
attributes :id, :name, :due_date, :description, :state
attribute :my_module_group_id, key: :task_group_id
belongs_to :experiment, serializer: ExperimentSerializer
2018-09-05 15:55:04 +08:00
end
end
end