From 890e0a97fb1179fb0acadf3d7146bb786b0c9e0d Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 23 May 2014 10:09:24 -0700 Subject: remove NullRequest and just always pass a request class --- actionpack/lib/action_dispatch/journey/router.rb | 27 +----------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb index 5e1fc55d36..26776d2dd8 100644 --- a/actionpack/lib/action_dispatch/journey/router.rb +++ b/actionpack/lib/action_dispatch/journey/router.rb @@ -20,37 +20,12 @@ module ActionDispatch # :nodoc: VERSION = '2.0.0' - class NullReq # :nodoc: - attr_reader :env - attr_accessor :path_parameters - def initialize(env) - @env = env - @path_parameters = {} - end - - def request_method - env['REQUEST_METHOD'] - end - - def path_info - env['PATH_INFO'] - end - - def ip - env['REMOTE_ADDR'] - end - - def [](k) - env[k] - end - end - attr_reader :request_class, :formatter attr_accessor :routes def initialize(routes, options) @options = options - @request_class = options[:request_class] || NullReq + @request_class = options[:request_class] @routes = routes end -- cgit v1.2.3