mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix docs for singleton resources
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5702 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
d0fa4d3e33
commit
c49cd7f18a
1 changed files with 4 additions and 4 deletions
|
@ -276,10 +276,10 @@ module ActionController
|
|||
# controllers and views. <tt>map.resource :account</tt> produces the following named routes and helpers:
|
||||
#
|
||||
# Named Route Helpers
|
||||
# account account_url(id), hash_for_account_url(id),
|
||||
# account_path(id), hash_for_account_path(id)
|
||||
# edit_account edit_account_url(id), hash_for_edit_account_url(id),
|
||||
# edit_account_path(id), hash_for_edit_account_path(id)
|
||||
# account account_url, hash_for_account_url,
|
||||
# account_path, hash_for_account_path
|
||||
# edit_account edit_account_url, hash_for_edit_account_url,
|
||||
# edit_account_path, hash_for_edit_account_path
|
||||
def resource(*entities, &block)
|
||||
options = entities.last.is_a?(Hash) ? entities.pop : { }
|
||||
entities.each { |entity| map_singleton_resource entity, options.dup, &block }
|
||||
|
|
Loading…
Reference in a new issue