diff options
author | Cheah Chu Yeow <chuyeow@gmail.com> | 2008-06-23 20:51:38 +0800 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-07-09 13:02:14 +0100 |
commit | 96708af6a58a48c2324a3bf8d34232bc29b398c9 (patch) | |
tree | 48a7259154f5349d57ee73b06fadcd1dd25aaf91 /actionpack/lib/action_controller | |
parent | 2b4eb586efa240dd985d8b5fe918084ab17fae2b (diff) | |
download | rails-96708af6a58a48c2324a3bf8d34232bc29b398c9.tar.gz rails-96708af6a58a48c2324a3bf8d34232bc29b398c9.tar.bz2 rails-96708af6a58a48c2324a3bf8d34232bc29b398c9.zip |
Ensure url_for(nil) falls back to url_for({}). [#472 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index c28e9005cf..f6d5491100 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -613,7 +613,8 @@ 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 = {}) #:doc: + def url_for(options = {}) + options ||= {} case options when String options |