mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update respond_with docs to deal better with collections.
This commit is contained in:
parent
3e9bb5459c
commit
ffe731c922
1 changed files with 6 additions and 1 deletions
|
@ -68,7 +68,7 @@ module ActionController #:nodoc:
|
||||||
# respond_with(@project, @task)
|
# respond_with(@project, @task)
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# Giving an array of resources, you ensure that the responder will redirect to
|
# Giving several resources ensures that the responder will redirect to
|
||||||
# <code>project_task_url</code> instead of <code>task_url</code>.
|
# <code>project_task_url</code> instead of <code>task_url</code>.
|
||||||
#
|
#
|
||||||
# Namespaced and singleton resources require a symbol to be given, as in
|
# Namespaced and singleton resources require a symbol to be given, as in
|
||||||
|
@ -77,6 +77,11 @@ module ActionController #:nodoc:
|
||||||
#
|
#
|
||||||
# respond_with(@project, :manager, @task)
|
# respond_with(@project, :manager, @task)
|
||||||
#
|
#
|
||||||
|
# Note that if you give an array, it will be treated as a collection,
|
||||||
|
# so the following is not equivalent:
|
||||||
|
#
|
||||||
|
# respond_with [@project, :manager, @task]
|
||||||
|
#
|
||||||
# === Custom options
|
# === Custom options
|
||||||
#
|
#
|
||||||
# <code>respond_with</code> also allow you to pass options that are forwarded
|
# <code>respond_with</code> also allow you to pass options that are forwarded
|
||||||
|
|
Loading…
Reference in a new issue