mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Remove trailing slash from topic URL
this lead to duplicate slashes in concatenated URLs
This commit is contained in:
parent
df18243827
commit
53d2232731
@ -1001,7 +1001,7 @@ class Topic < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.url(id, slug, post_number = nil)
|
def self.url(id, slug, post_number = nil)
|
||||||
url = +"#{Discourse.base_url}/t/#{slug}/#{id}/"
|
url = +"#{Discourse.base_url}/t/#{slug}/#{id}"
|
||||||
url << "/#{post_number}" if post_number.to_i > 1
|
url << "/#{post_number}" if post_number.to_i > 1
|
||||||
url
|
url
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user