aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2015-11-21 01:12:45 +0900
committeryui-knk <spiketeika@gmail.com>2015-11-21 01:12:45 +0900
commit8d23f37b15e1b3eca694ebbd6dd7dbf0016c5fbe (patch)
treed75b45a5be9a826df93ee3e50ff2ecd8cdeb829f /actionpack
parentf6d12b8ea235e5b9c1d23edbff88765d7882ce94 (diff)
downloadrails-8d23f37b15e1b3eca694ebbd6dd7dbf0016c5fbe.tar.gz
rails-8d23f37b15e1b3eca694ebbd6dd7dbf0016c5fbe.tar.bz2
rails-8d23f37b15e1b3eca694ebbd6dd7dbf0016c5fbe.zip
Remove arity check for `RouteSet#draw`
This code was added for migration from Rails 3.1 to upper, now we are developing Rails 5.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb4
-rw-r--r--actionpack/test/controller/routing_test.rb6
2 files changed, 0 insertions, 10 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 5f54ea130b..c4228df925 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -371,10 +371,6 @@ module ActionDispatch
end
def eval_block(block)
- if block.arity == 1
- raise "You are using the old router DSL which has been removed in Rails 3.1. " <<
- "Please check how to update your routes file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/"
- end
mapper = Mapper.new(self)
if default_scope
mapper.with_default_scope(default_scope, &block)
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 4a2b02a003..a39fede5b9 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -289,12 +289,6 @@ class LegacyRouteSetTests < ActiveSupport::TestCase
assert_equal({:id=>"1", :filters=>"foo", :format=>"js"}, params)
end
- def test_draw_with_block_arity_one_raises
- assert_raise(RuntimeError) do
- rs.draw { |map| map.match '/:controller(/:action(/:id))' }
- end
- end
-
def test_specific_controller_action_failure
rs.draw do
mount lambda {} => "/foo"