diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-13 05:44:18 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-13 05:44:18 +0000 |
commit | f770165cc23a44ac329b5b1fbd47376a6c2e3f11 (patch) | |
tree | c63dea6404c89bd271e9eb304a1539d8a3950dd9 /actionpack/lib | |
parent | 42f8e3f611fa12b37793620ca2f7bd5c360631c8 (diff) | |
download | rails-f770165cc23a44ac329b5b1fbd47376a6c2e3f11.tar.gz rails-f770165cc23a44ac329b5b1fbd47376a6c2e3f11.tar.bz2 rails-f770165cc23a44ac329b5b1fbd47376a6c2e3f11.zip |
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
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 16 |
1 files changed, 4 insertions, 12 deletions
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, <tt>url_for :action => 'print'</tt> # 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 |