diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-23 10:09:24 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-23 10:09:24 -0700 |
commit | 890e0a97fb1179fb0acadf3d7146bb786b0c9e0d (patch) | |
tree | 33fdc1cb2f8aee154d3cd2c116628aed437edf1a /actionpack/lib/action_dispatch/journey | |
parent | a6e94547e84ae692a084a95f2c3ba02d513edf3e (diff) | |
download | rails-890e0a97fb1179fb0acadf3d7146bb786b0c9e0d.tar.gz rails-890e0a97fb1179fb0acadf3d7146bb786b0c9e0d.tar.bz2 rails-890e0a97fb1179fb0acadf3d7146bb786b0c9e0d.zip |
remove NullRequest and just always pass a request class
Diffstat (limited to 'actionpack/lib/action_dispatch/journey')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router.rb | 27 |
1 files changed, 1 insertions, 26 deletions
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 |