|
|
@ -8,7 +8,7 @@ json.data do
|
|
|
|
json.array! @messages do |message|
|
|
|
|
json.array! @messages do |message|
|
|
|
|
json.extract! message, :id, :parent_id, :subject, :created_on, :total_replies_count,
|
|
|
|
json.extract! message, :id, :parent_id, :subject, :created_on, :total_replies_count,
|
|
|
|
:praises_count, :visits, :sticky, :is_hidden, :is_public, :board_id
|
|
|
|
:praises_count, :visits, :sticky, :is_hidden, :is_public, :board_id
|
|
|
|
json.category_name message.board&.name
|
|
|
|
json.category_name message.board&.name if @board.parent_id == 0 && message.board_id != @board.id
|
|
|
|
|
|
|
|
|
|
|
|
json.total_praises_count @praises_count_map.fetch(message.id, 0)
|
|
|
|
json.total_praises_count @praises_count_map.fetch(message.id, 0)
|
|
|
|
|
|
|
|
|
|
|
|