From 1ae8dae3d7310a49d0663cab6aa59f9d95a4a55e Mon Sep 17 00:00:00 2001 From: Larissa Reis Date: Thu, 19 May 2016 19:17:00 -0300 Subject: [PATCH] follow-articles: sets profile on url to avoid route no match --- app/helpers/article_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/article_helper.rb b/app/helpers/article_helper.rb index 1786138..91cf151 100644 --- a/app/helpers/article_helper.rb +++ b/app/helpers/article_helper.rb @@ -187,9 +187,9 @@ module ArticleHelper def following_button(page, user) if !user.blank? and user != page.author if page.is_followed_by? user - button :cancel, unfollow_button_text(page), {:controller => 'profile', :action => 'unfollow_article', :article_id => page.id, :profile => page.profile.identifier} + button :cancel, unfollow_button_text(page), {:controller => 'profile', :profile => page.profile.identifier, :action => 'unfollow_article', :article_id => page.id, :profile => page.profile.identifier} else - button :add, follow_button_text(page), {:controller => 'profile', :action => 'follow_article', :article_id => page.id, :profile => page.profile.identifier} + button :add, follow_button_text(page), {:controller => 'profile', :profile => page.profile.identifier, :action => 'follow_article', :article_id => page.id, :profile => page.profile.identifier} end end end -- libgit2 0.21.2