Commit 1ae8dae3d7310a49d0663cab6aa59f9d95a4a55e
1 parent
68660d32
Exists in
staging
and in
28 other branches
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,9 +187,9 @@ module ArticleHelper | ||
187 | def following_button(page, user) | 187 | def following_button(page, user) |
188 | if !user.blank? and user != page.author | 188 | if !user.blank? and user != page.author |
189 | if page.is_followed_by? user | 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 | else | 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 | end | 193 | end |
194 | end | 194 | end |
195 | end | 195 | end |