mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +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
|
attributes :id, :message
|
||||||
|
|
||||||
belongs_to :user, serializer: UserSerializer
|
belongs_to :user, serializer: UserSerializer
|
||||||
belongs_to :project, serializer: ProjectSerializer,
|
belongs_to :project,
|
||||||
|
serializer: ProjectSerializer,
|
||||||
if: -> { object.class == ProjectComment &&
|
if: -> { object.class == ProjectComment &&
|
||||||
!instance_options[:hide_project] }
|
!instance_options[:hide_project] }
|
||||||
# TODO
|
# TODO
|
||||||
#belongs_to :my_module, serializer: TaskSerializer,
|
#belongs_to :my_module,
|
||||||
|
# serializer: TaskSerializer,
|
||||||
# key: :task,
|
# key: :task,
|
||||||
# class_name: 'MyModule',
|
# class_name: 'MyModule',
|
||||||
# if: -> { object.class == TaskComment &&
|
# if: -> { object.class == TaskComment &&
|
||||||
# !instance_options[:hide_task] }
|
# !instance_options[:hide_task] }
|
||||||
#belongs_to :step, serializer: StepSerializer,
|
#belongs_to :step,
|
||||||
|
# serializer: StepSerializer,
|
||||||
# if: -> { object.class == StepComment &&
|
# if: -> { object.class == StepComment &&
|
||||||
# !instance_options[:hide_step] }
|
# !instance_options[:hide_step] }
|
||||||
belongs_to :result, serializer: ResultSerializer,
|
belongs_to :result,
|
||||||
|
serializer: ResultSerializer,
|
||||||
if: -> { object.class == ResultComment &&
|
if: -> { object.class == ResultComment &&
|
||||||
!instance_options[:hide_result] }
|
!instance_options[:hide_result] }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue