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

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