mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add rubocop to our build. (#5004)
This commit is contained in:
@@ -12,7 +12,7 @@ class TopicLinkClick < ActiveRecord::Base
|
||||
WHITELISTED_REDIRECT_HOSTNAMES = Set.new(%W{www.youtube.com youtu.be})
|
||||
|
||||
# Create a click from a URL and post_id
|
||||
def self.create_from(args={})
|
||||
def self.create_from(args = {})
|
||||
url = args[:url][0...TopicLink.max_url_length]
|
||||
return nil if url.blank?
|
||||
|
||||
@@ -31,7 +31,7 @@ class TopicLinkClick < ActiveRecord::Base
|
||||
query = url.index('?')
|
||||
unless query.nil?
|
||||
endpos = url.index('#') || url.size
|
||||
urls << url[0..query-1] + url[endpos..-1]
|
||||
urls << url[0..query - 1] + url[endpos..-1]
|
||||
end
|
||||
|
||||
# add a cdn link
|
||||
|
||||
Reference in New Issue
Block a user