Sha256: 533b176d14f02cac9fd47c04dfff3bd46c7e0b6f2134c7441f84155a49d58bfb
Contents?: true
Size: 457 Bytes
Versions: 12
Compression:
Stored size: 457 Bytes
Contents
module Xing::Services module Locator def route_to(path) path = "http://#{BACKEND_SUBDOMAIN}.example.com#{normalize_path(path)}"; router.recognize_path(path) end def normalize_path(path) path = "/#{path}" path.squeeze!('/') path.sub!(%r{/+\Z}, '') path.gsub!(/(%[a-f0-9]{2})/) { $1.upcase } path = '/' if path == '' path end def router Rails.application.routes end end end
Version data entries
12 entries across 12 versions & 1 rubygems