mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 00:48:05 +08:00
FIX: DiscourseLocalOnebox should have a higher priority than other
discourse sites
This commit is contained in:
@ -5,6 +5,11 @@ module Onebox
|
||||
|
||||
matches_regexp Regexp.new("^#{Discourse.base_url.gsub(".","\\.")}.*$", true)
|
||||
|
||||
# Use this onebox before others
|
||||
def self.priority
|
||||
1
|
||||
end
|
||||
|
||||
def to_html
|
||||
uri = URI::parse(@url)
|
||||
route = Rails.application.routes.recognize_path(uri.path)
|
||||
|
Reference in New Issue
Block a user