Skip to content

Commit ad1225d

Browse files
committed
Merge pull request coderwall#241 from podviaznikov/follow-link-fix
Clicking on follow while not logged in, redirects to the homepage without showing the notice
2 parents 32bec64 + c9e6cbb commit ad1225d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/users/show.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
-elsif signed_in?
170170
=link_to(defined_in_css = '', follow_user_path(@user.username), :method => :post, :remote => true, :class => 'add-to-network track', 'data-action' => 'follow user', 'data-from' => 'profile sidebar')
171171
-else
172-
=link_to(defined_in_css = '', root_path(:flash => 'You must signin or signup before you can follow someone'), :class => 'add-to-network noauth track', 'data-action' => 'follow user', 'data-from' => 'profile sidebar')
172+
=link_to(defined_in_css = '', signin_path(:flash => 'You must signin or signup before you can follow someone'), :class => 'add-to-network noauth track', 'data-action' => 'follow user', 'data-from' => 'profile sidebar')
173173
-if signed_in? && @user.following?(current_user)
174174
.followed-back
175175
%p== #{@user.short_name} is following you

0 commit comments

Comments
 (0)