aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-12-28 15:31:03 -0600
committerJoshua Peek <josh@joshpeek.com>2008-12-28 15:31:03 -0600
commit5d89605c11cc54acadfdd76ccd226d38989ec600 (patch)
tree07a06d5b9584d8ae98f32781517007eafccd5fad /actionpack/lib/action_controller/routing
parent45dee3842d68359a189fe7c0729359bd5a905ea4 (diff)
downloadrails-5d89605c11cc54acadfdd76ccd226d38989ec600.tar.gz
rails-5d89605c11cc54acadfdd76ccd226d38989ec600.tar.bz2
rails-5d89605c11cc54acadfdd76ccd226d38989ec600.zip
Make router and controller classes better rack citizens
Diffstat (limited to 'actionpack/lib/action_controller/routing')
-rw-r--r--actionpack/lib/action_controller/routing/route_set.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/routing/route_set.rb b/actionpack/lib/action_controller/routing/route_set.rb
index 5975977365..06aef6e169 100644
--- a/actionpack/lib/action_controller/routing/route_set.rb
+++ b/actionpack/lib/action_controller/routing/route_set.rb
@@ -427,6 +427,12 @@ module ActionController
end
end
+ def call(env)
+ request = Request.new(env)
+ app = Routing::Routes.recognize(request)
+ app.call(env).to_a
+ end
+
def recognize(request)
params = recognize_path(request.path, extract_request_environment(request))
request.path_parameters = params.with_indifferent_access