Skip to content

Commit

Permalink
Use nofollow on login link.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed Mar 26, 2013
1 parent 1696d37 commit 15476aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/zena/use/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,14 @@ def r_login_link
else_markup.set_dyn_param('href', '<%= logout_path %>')

markup.set_dyn_param('href', '<%= login_path %>')
unless markup.param[:rel]
markup.set_param('rel', 'nofollow')
end

out markup.wrap(expand_if("visitor.is_anon?", self.node, else_markup))
else
out "<% if visitor.is_anon? %>"
out "<%= link_to #{_('login').inspect}, login_path %>"
out "<%= link_to #{_('login').inspect}, login_path, :rel => 'nofollow' %>"
out "<% else %>"
out "<%= link_to #{_('logout').inspect}, logout_path %>"
out "<% end %>"
Expand Down

0 comments on commit 15476aa

Please sign in to comment.