Sha256: 7477b4cb6dab0a5fb4d5e4e095bff01683c28c470baf7cf1efd0eda472cf7f4d

Contents?: true

Size: 422 Bytes

Versions: 5

Compression:

Stored size: 422 Bytes

Contents

require 'fozzie/rack/middleware'

module Fozzie
  module Rails
    class Middleware < Fozzie::Rack::Middleware

      def generate_key(env)
        s = env['PATH_INFO']
        return nil if s.nil?
        begin
          path = ActionController::Routing::Routes.recognize_path(s)
          [path[:controller], path[:action], "render"].join('.')
        rescue => exc
          nil
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fozzie-0.0.11 lib/fozzie/rails/middleware.rb
fozzie-0.0.10 lib/fozzie/rails/middleware.rb
fozzie-0.0.9 lib/fozzie/rails/middleware.rb
fozzie-0.0.8 lib/fozzie/rails/middleware.rb
fozzie-0.0.7 lib/fozzie/rails/middleware.rb