FIX: DiscourseLocalOnebox should have a higher priority than other

discourse sites
This commit is contained in:
Robin Ward 2014-02-25 14:08:48 -05:00
parent 2def97aceb
commit cbf2e2e8f9
2 changed files with 6 additions and 1 deletions

View File

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

View File

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