Permalink
Browse files

no more #route for Sinatra::Request

should work for 1.2.x and 1.3.x Sinatre.
  • Loading branch information...
1 parent ecb3013 commit 8adee7b7a7d6346303443b20684eb65f1d82e6d4 @jmettraux jmettraux committed Mar 8, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/ruote-kit/resources/expressions.rb
@@ -65,10 +65,10 @@ class RuoteKit::Application
RuoteKit.engine.resume(exp.fei)
end
- route = request.route
- route = route + '.json' if request.media_type.match(/json/) # :-(
+ path = Rack::Utils.unescape(request.path_info)
+ path = path + '.json' if request.media_type.match(/json/) # :-(
- redirect(url(route))
+ redirect(url(path))
else

0 comments on commit 8adee7b

Please sign in to comment.