Skip to content
Permalink
Browse files

sinatra relative routes don't start with slash

  • Loading branch information...
captn3m0 committed Aug 22, 2015
1 parent fa93a81 commit 8d5db5d3d63068c1ff122d9a0a537561f333e2dd
Showing with 2 additions and 2 deletions.
  1. +1 −1 app.rb
  2. +1 −1 test.rb
2 app.rb
@@ -5,7 +5,7 @@

def get_url(domain_object, rel_route)
if domain_object.is_a? Hash
return domain_object['root'] + rel_route
return domain_object['root'] + "/" + rel_route
elsif domain_object.is_a? String
return domain_object
end
@@ -39,7 +39,7 @@ def resolves_to_lightsaber(domain)

def get_url(domain_object, rel_route)
if domain_object.is_a? Hash
return domain_object['root'] + rel_route
return domain_object['root'] + "/" + rel_route
elsif domain_object.is_a? String
return domain_object
end

0 comments on commit 8d5db5d

Please sign in to comment.
You can’t perform that action at this time.