aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-07-25 23:42:05 +0200
committerXavier Noria <fxn@hashref.com>2010-07-25 23:42:24 +0200
commit06853cb0a9ff77c67ec30e70b4007c4f9d11838b (patch)
tree2ed095400530e3d2126d64fcb98250f5605e9983 /railties/guides
parent9a32af96d1371a9e0ae2c242b8cbcb64ed2f8c95 (diff)
downloadrails-06853cb0a9ff77c67ec30e70b4007c4f9d11838b.tar.gz
rails-06853cb0a9ff77c67ec30e70b4007c4f9d11838b.tar.bz2
rails-06853cb0a9ff77c67ec30e70b4007c4f9d11838b.zip
AS guide: Object#returning is gone
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/active_support_core_extensions.textile15
1 files changed, 0 insertions, 15 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index e53c7715bb..d14a531abe 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -157,21 +157,6 @@ WARNING. Using +duplicable?+ is discouraged because it depends on a hard-coded l
NOTE: Defined in +active_support/core_ext/object/duplicable.rb+.
-h4. +returning+
-
-The method +returning+ yields its argument to a block and returns it. You typically use it with a mutable object that gets modified in the block:
-
-<ruby>
-def html_options_for_form(url_for_options, options, *parameters_for_url)
- returning options.stringify_keys do |html_options|
- html_options["enctype"] = "multipart/form-data" if html_options.delete("multipart")
- html_options["action"] = url_for(url_for_options, *parameters_for_url)
- end
-end
-</ruby>
-
-NOTE: Defined in +active_support/core_ext/object/returning.rb+.
-
h4. +try+
Sometimes you want to call a method provided the receiver object is not +nil+, which is something you usually check first.