Class: Fozzie::Rails::Middleware

Inherits:
Fozzie::Rack::Middleware show all
Defined in:
lib/fozzie/rails/middleware.rb

Instance Attribute Summary

Attributes inherited from Fozzie::Rack::Middleware

#app

Instance Method Summary collapse

Methods inherited from Fozzie::Rack::Middleware

#call, #call_with_timer, #call_without_timer, #initialize

Constructor Details

This class inherits a constructor from Fozzie::Rack::Middleware

Instance Method Details

#generate_key(env) ⇒ Object



7
8
9
10
11
12
# File 'lib/fozzie/rails/middleware.rb', line 7

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('.')
end