diff options
author | José Valim <jose.valim@gmail.com> | 2011-09-22 02:56:00 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-09-22 02:56:00 -0700 |
commit | 8de0bbe0b48b1d5a05a4159dd6197d6c9cff7979 (patch) | |
tree | 1f6f20b6d495ed9280c603009547010f66b047ea /actionpack/lib/action_dispatch | |
parent | 2bf33bd4bcd488a35e641b32dd667f3092ea9197 (diff) | |
parent | 019eea4a388442a004287ad2e73772f3fefc7028 (diff) | |
download | rails-8de0bbe0b48b1d5a05a4159dd6197d6c9cff7979.tar.gz rails-8de0bbe0b48b1d5a05a4159dd6197d6c9cff7979.tar.bz2 rails-8de0bbe0b48b1d5a05a4159dd6197d6c9cff7979.zip |
Merge pull request #3099 from wrozka/master
Named routes are modifying passed options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 46a68a32ae..e921269331 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -165,13 +165,14 @@ module ActionDispatch remove_possible_method :#{selector} def #{selector}(*args) options = args.extract_options! + result = #{options.inspect} if args.any? - options[:_positional_args] = args - options[:_positional_keys] = #{route.segment_keys.inspect} + result[:_positional_args] = args + result[:_positional_keys] = #{route.segment_keys.inspect} end - options ? #{options.inspect}.merge(options) : #{options.inspect} + result.merge(options) end protected :#{selector} END_EVAL |