Commit 1ae8dae3d7310a49d0663cab6aa59f9d95a4a55e

Authored by Larissa Reis
1 parent 68660d32

follow-articles: sets profile on url to avoid route no match

For profiles with own domain sometimes there is no profile set, so we
have to give a profile on url generation to avoid breakage here.
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/helpers/article_helper.rb
... ... @@ -187,9 +187,9 @@ module ArticleHelper
187 187 def following_button(page, user)
188 188 if !user.blank? and user != page.author
189 189 if page.is_followed_by? user
190   - button :cancel, unfollow_button_text(page), {:controller => 'profile', :action => 'unfollow_article', :article_id => page.id, :profile => page.profile.identifier}
  190 + button :cancel, unfollow_button_text(page), {:controller => 'profile', :profile => page.profile.identifier, :action => 'unfollow_article', :article_id => page.id, :profile => page.profile.identifier}
191 191 else
192   - button :add, follow_button_text(page), {:controller => 'profile', :action => 'follow_article', :article_id => page.id, :profile => page.profile.identifier}
  192 + button :add, follow_button_text(page), {:controller => 'profile', :profile => page.profile.identifier, :action => 'follow_article', :article_id => page.id, :profile => page.profile.identifier}
193 193 end
194 194 end
195 195 end
... ...