diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-05 03:01:15 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-05 03:01:15 -0700 |
commit | ffe731c922e2290b6796a74cfe82f80ce9be009e (patch) | |
tree | 300a5259d958537f0cf6abbde0fe9df30412a517 | |
parent | 3e9bb5459cfc88e0fa6de7a14b21490308ed9682 (diff) | |
download | rails-ffe731c922e2290b6796a74cfe82f80ce9be009e.tar.gz rails-ffe731c922e2290b6796a74cfe82f80ce9be009e.tar.bz2 rails-ffe731c922e2290b6796a74cfe82f80ce9be009e.zip |
Update respond_with docs to deal better with collections.
-rw-r--r-- | actionpack/lib/action_controller/metal/responder.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/responder.rb b/actionpack/lib/action_controller/metal/responder.rb index 59a3621f72..ebadb29ea7 100644 --- a/actionpack/lib/action_controller/metal/responder.rb +++ b/actionpack/lib/action_controller/metal/responder.rb @@ -68,7 +68,7 @@ module ActionController #:nodoc: # respond_with(@project, @task) # 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>. # # Namespaced and singleton resources require a symbol to be given, as in @@ -77,6 +77,11 @@ module ActionController #:nodoc: # # 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 # # <code>respond_with</code> also allow you to pass options that are forwarded |