From f770165cc23a44ac329b5b1fbd47376a6c2e3f11 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 13 Mar 2007 05:44:18 +0000 Subject: Deprecation: remove deprecated url_for(:symbol, *args) and redirect_to(:symbol, *args) controller methods. Use named routes instead. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/base.rb | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 9ce3c31de8..2f7919cc07 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -553,22 +553,14 @@ module ActionController #:nodoc: # # This takes the current URL as is and only exchanges the action. In contrast, url_for :action => 'print' # would have slashed-off the path components after the changed action. - def url_for(options = {}, *parameters_for_method_reference) #:doc: - case options + def url_for(options = nil) #:doc: + case options || {} when String options - - when Symbol - ActiveSupport::Deprecation.warn( - "You called url_for(:#{options}), which is a deprecated API call. Instead you should use the named " + - "route directly, like #{options}(). Using symbols and parameters with url_for will be removed from Rails 2.0.", - caller - ) - - send(options, *parameters_for_method_reference) - when Hash @url.rewrite(rewrite_options(options)) + else + raise ArgumentError, "Unrecognized url_for options: #{options.inspect}" end end -- cgit v1.2.3