From 30c569f6fae59e36065e7119b982ef28ea6c7e69 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Wed, 17 Jun 2015 20:37:41 -0300 Subject: [PATCH] Fix followers count --- lib/noosfero/api/v1/articles.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/noosfero/api/v1/articles.rb b/lib/noosfero/api/v1/articles.rb index bbf7a61..eb1ede7 100644 --- a/lib/noosfero/api/v1/articles.rb +++ b/lib/noosfero/api/v1/articles.rb @@ -32,7 +32,7 @@ module Noosfero desc "Returns the total followers for the article" get ':id/followers' do article = find_article(environment.articles, params[:id]) - total = article.person_followers.size + total = article.person_followers.count {:total_followers => total} end -- libgit2 0.21.2