FIX: DiscourseLocalOnebox should have a higher priority than other
discourse sites
This commit is contained in:
parent
2def97aceb
commit
cbf2e2e8f9
|
@ -204,7 +204,7 @@ GEM
|
|||
omniauth-twitter (1.0.1)
|
||||
multi_json (~> 1.3)
|
||||
omniauth-oauth (~> 1.0)
|
||||
onebox (1.2.4)
|
||||
onebox (1.2.5)
|
||||
hexpress (~> 1.2)
|
||||
moneta (~> 0.7)
|
||||
multi_json (~> 1.7)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue