mirror of
https://github.com/github/rails.git
synced 2026-01-30 16:58:15 -05:00
If not passing a hash, assume :id => whatever
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user