aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/route_set.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-08-05 15:44:23 +0200
committerPiotr Sarnacki <drogus@gmail.com>2010-09-05 13:44:36 +0200
commitb3eb26a161acb23781e55fc6c37b948f160cd9b5 (patch)
tree3c8e43a17dc5fe06eb3b4552d04d479863161fb5 /actionpack/lib/action_dispatch/routing/route_set.rb
parent91fec0d24d50d3b3e90c48b2501ca913544781cc (diff)
downloadrails-b3eb26a161acb23781e55fc6c37b948f160cd9b5.tar.gz
rails-b3eb26a161acb23781e55fc6c37b948f160cd9b5.tar.bz2
rails-b3eb26a161acb23781e55fc6c37b948f160cd9b5.zip
Removed deprecated RouteSet API, still many tests fail
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 107e44287d..956bd2e719 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -1,7 +1,6 @@
require 'rack/mount'
require 'forwardable'
require 'active_support/core_ext/object/to_query'
-require 'action_dispatch/routing/deprecated_mapper'
module ActionDispatch
module Routing
@@ -211,7 +210,6 @@ module ActionDispatch
self.routes = []
self.named_routes = NamedRouteCollection.new
self.resources_path_names = self.class.default_resources_path_names.dup
- self.controller_namespaces = Set.new
self.default_url_options = {}
self.request_class = request_class
@@ -227,14 +225,10 @@ module ActionDispatch
clear! unless @disable_clear_and_finalize
mapper = Mapper.new(self)
- if block.arity == 1
- mapper.instance_exec(DeprecatedMapper.new(self), &block)
+ if default_scope
+ mapper.with_default_scope(default_scope, &block)
else
- if default_scope
- mapper.with_default_scope(default_scope, &block)
- else
- mapper.instance_exec(&block)
- end
+ mapper.instance_exec(&block)
end
finalize! unless @disable_clear_and_finalize