lib/fozzie/rails/middleware.rb in fozzie-0.0.6 vs lib/fozzie/rails/middleware.rb in fozzie-0.0.7
- old
+ new
@@ -5,11 +5,15 @@
class Middleware < Fozzie::Rack::Middleware
def generate_key(env)
s = env['PATH_INFO']
return nil if s.nil?
- path = ActionController::Routing::Routes.recognize_path(s)
- [path[:controller], path[:action], "render"].join('.')
+ begin
+ path = ActionController::Routing::Routes.recognize_path(s)
+ [path[:controller], path[:action], "render"].join('.')
+ rescue => exc
+ nil
+ end
end
end
end
end
\ No newline at end of file