json.total_count @project_topics.total_count json.project_topics @project_topics.each do |topic| json.(topic, :id, :name, :projects_count) end