diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-12 16:20:52 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-12 16:20:52 -0700 |
commit | 3ccd24a33f3f9d6cad83181708e5aa11588b88b0 (patch) | |
tree | ecd0b4a152e94f2bb4bbe9d016cdd7a3e516ffb4 | |
parent | 547881594b32a447178c3e90c88e1b6437ee51e0 (diff) | |
download | rails-3ccd24a33f3f9d6cad83181708e5aa11588b88b0.tar.gz rails-3ccd24a33f3f9d6cad83181708e5aa11588b88b0.tar.bz2 rails-3ccd24a33f3f9d6cad83181708e5aa11588b88b0.zip |
Revert "reduce conditionals in url_for"
This reverts commit 9df60693d77813b362fb528fc62381ac8f1eec12.
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index cc31c4306f..d61b430f68 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -655,7 +655,7 @@ module ActionDispatch options = default_url_options.merge(options || {}) user, password = extract_authentication(options) - recall = options.delete(:_recall) { {} } + recall = options.delete(:_recall) original_script_name = options.delete(:original_script_name).presence script_name = options.delete(:script_name).presence || _generate_prefix(options) @@ -668,11 +668,8 @@ module ActionDispatch RESERVED_OPTIONS.each { |ro| path_options.delete ro } path_options = yield(path_options) if block_given? - path, params = generate(path_options, recall) - - if options.key? :params - params.merge! options[:params] - end + path, params = generate(path_options, recall || {}) + params.merge!(options[:params] || {}) ActionDispatch::Http::URL.url_for(options.merge!({ :path => path, |