You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
559 B
12 lines
559 B
json.extract! tiding, :id, :status, :viewed, :user_id, :tiding_type, :container_id, :container_type, :parent_container_id, :parent_container_type
|
|
json.content tiding.content
|
|
json.identifier tiding.try(:container).try(:identifier) rescue nil
|
|
json.time tiding.how_long_time
|
|
json.new_tiding tiding.unread?(@onclick_time)
|
|
|
|
json.trigger_user do
|
|
json.partial! 'users/user_simple', user: tiding.trigger_user_id.zero? ? User.find(1) : tiding.trigger_user
|
|
end
|
|
|
|
json.attachments tiding.attachments, partial: 'attachments/attachment_small', as: :attachment
|