Add rubocop to our build. (#5004)

This commit is contained in:
Guo Xiang Tan
2017-07-28 10:20:09 +09:00
committed by GitHub
parent ff4e295c4f
commit 5012d46cbd
871 changed files with 5480 additions and 6056 deletions

View File

@@ -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