aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-20 15:12:30 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-23 10:14:15 -0800
commite848c52535fa0f9488cdbdb3f1cedc7c7c02d643 (patch)
treec1908c819032c1a6dcb75c80246bc7ed58610ba9 /actionpack/lib/action_dispatch/routing
parent01176a7eaf40577e298b2c6e120e3fa17feabcc7 (diff)
downloadrails-e848c52535fa0f9488cdbdb3f1cedc7c7c02d643.tar.gz
rails-e848c52535fa0f9488cdbdb3f1cedc7c7c02d643.tar.bz2
rails-e848c52535fa0f9488cdbdb3f1cedc7c7c02d643.zip
Deprecated multi args to http route methods
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 5b7f1c989c..9ca3566663 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -2,6 +2,7 @@ require 'active_support/core_ext/hash/except'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/inclusion'
require 'active_support/inflector'
+require 'active_support/deprecation'
require 'action_dispatch/routing/redirection'
module ActionDispatch
@@ -499,6 +500,16 @@ module ActionDispatch
private
def map_method(method, args, &block)
+ if args.length > 2
+ ActiveSupport::Deprecation.warn <<-eowarn
+The method signature of #{method}() is changing to:
+
+ #{method}(path, options = {})
+
+Calling with multiple paths is deprecated.
+ eowarn
+ end
+
options = args.extract_options!
options[:via] = method
match(*args, options, &block)