mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
FIX: DiscourseLocalOnebox should have a higher priority than other
discourse sites
This commit is contained in:
parent
2def97aceb
commit
cbf2e2e8f9
2 changed files with 6 additions and 1 deletions
|
@ -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 a new issue