Skip to content

Commit

Permalink
disable tag backlinking on posts for anon users (helps with web crawl…
Browse files Browse the repository at this point in the history
…ers)
  • Loading branch information
r888888888 committed Jun 14, 2016
1 parent aa77ba3 commit 2726450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/presenters/post_presenter.rb
Expand Up @@ -22,7 +22,7 @@ def self.preview(post, options = {})
path = options[:path_prefix] || "/posts"

html = %{<article itemscope itemtype="http://schema.org/ImageObject" id="post_#{post.id}" class="#{preview_class(post, options[:pool])}" #{data_attributes(post)}>}
if options[:tags].present?
if options[:tags].present? && !CurrentUser.is_anonymous?
tag_param = "?tags=#{CGI::escape(options[:tags])}"
elsif options[:pool_id] || options[:pool]
tag_param = "?pool_id=#{CGI::escape((options[:pool_id] || options[:pool].id).to_s)}"
Expand Down

0 comments on commit 2726450

Please sign in to comment.