diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index f52b78cc75..67339a6f21 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -713,7 +713,7 @@ module ActionController define_hash_access_method(route, name) module_eval(%{def #{url_helper_name name}(options = {}) - url_for(#{hash_access_name(name)}.merge(options)) + url_for(#{hash_access_name(name)}.merge(options.is_a?(Hash) ? options : { :id => options })) end}, "generated/routing/named_routes/#{name}.rb") protected url_helper_name(name), hash_access_name(name) |