json.partial! "commons/success" json.data do json.id @board.id json.name @board.fix_name json.parent_id @board.parent_id json.total_count @messages.total_count json.messages do json.array! @messages do |message| json.extract! message, :id, :parent_id, :subject, :created_on, :total_replies_count, :praises_count, :visits, :sticky, :is_hidden, :is_public json.total_praises_count @praises_count_map.fetch(message.id, 0) json.partial! "messages/message", message: message json.author do json.partial! "users/user_simple", user: message.author end end end end