diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-03 07:21:35 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-03 07:21:35 -0700 |
commit | f82767e276b7f6fcd7c0770348cb8f1716365dba (patch) | |
tree | e5e68e106e11e5fe2f061c1ecef427e4115797dd /actionpack/lib/action_dispatch | |
parent | 7ae3b82ceb83827a6f1c22ee6a6dbcfa0c44d13b (diff) | |
parent | 275529446e765cb3c6d1e84bb8c1c8707e1b34a4 (diff) | |
download | rails-f82767e276b7f6fcd7c0770348cb8f1716365dba.tar.gz rails-f82767e276b7f6fcd7c0770348cb8f1716365dba.tar.bz2 rails-f82767e276b7f6fcd7c0770348cb8f1716365dba.zip |
Merge pull request #377 from joshk/rails_legacy_mapper_message.
raise an error if the old router draw method is used
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 1d09091dc7..963a9107da 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -240,6 +240,11 @@ 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/ " << + "or add the rails_legacy_mapper gem to your Gemfile" + end mapper = Mapper.new(self) if default_scope mapper.with_default_scope(default_scope, &block) |