Commit 140ce4f88aa97aa7c94122d3d4412e3e7b993c9b

Authored by Victor Costa
2 parents ac1866da eced5f5b

Merge branch 'api' into production

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/noosfero/api/v1/articles.rb
@@ -39,7 +39,7 @@ module Noosfero @@ -39,7 +39,7 @@ module Noosfero
39 desc "Add a follower for the article" 39 desc "Add a follower for the article"
40 post ':id/follow' do 40 post ':id/follow' do
41 article = find_article(environment.articles, params[:id]) 41 article = find_article(environment.articles, params[:id])
42 - if article.article_followers.include?(current_person) 42 + if article.article_followers.exists?(:person_id => current_person.id)
43 {:success => false, :already_follow => true} 43 {:success => false, :already_follow => true}
44 else 44 else
45 article_follower = ArticleFollower.new 45 article_follower = ArticleFollower.new