mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 20:19:05 +08:00
Hound is love, Hound is life
This commit is contained in:
parent
dd4f7b5d02
commit
c0f47f03b7
1 changed files with 18 additions and 14 deletions
|
@ -7,19 +7,23 @@ module Api
|
|||
attributes :id, :message
|
||||
|
||||
belongs_to :user, serializer: UserSerializer
|
||||
belongs_to :project, serializer: ProjectSerializer,
|
||||
belongs_to :project,
|
||||
serializer: ProjectSerializer,
|
||||
if: -> { object.class == ProjectComment &&
|
||||
!instance_options[:hide_project] }
|
||||
# TODO
|
||||
#belongs_to :my_module, serializer: TaskSerializer,
|
||||
#belongs_to :my_module,
|
||||
# serializer: TaskSerializer,
|
||||
# key: :task,
|
||||
# class_name: 'MyModule',
|
||||
# if: -> { object.class == TaskComment &&
|
||||
# !instance_options[:hide_task] }
|
||||
#belongs_to :step, serializer: StepSerializer,
|
||||
#belongs_to :step,
|
||||
# serializer: StepSerializer,
|
||||
# if: -> { object.class == StepComment &&
|
||||
# !instance_options[:hide_step] }
|
||||
belongs_to :result, serializer: ResultSerializer,
|
||||
belongs_to :result,
|
||||
serializer: ResultSerializer,
|
||||
if: -> { object.class == ResultComment &&
|
||||
!instance_options[:hide_result] }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue