diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-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 |