FIX: Allow clicks on @names

This commit is contained in:
Robin Ward 2013-07-27 13:18:37 -04:00
parent 0320a5ae64
commit 3a861c0823
1 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,12 @@ class TopicLinkClick < ActiveRecord::Base
link = link.where(topic_id: args[:topic_id]) if args[:topic_id].present?
link = link.first
return unless link.present?
# If no link is found, return the url for relative links
unless link.present?
return args[:url] if args[:url] =~ /^\//
return nil
end
return args[:url] if (args[:user_id] && (link.user_id == args[:user_id]))