aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorMichael Raidel <raidel@induktiv.at>2015-03-03 21:08:18 +0100
committerMichael Raidel <raidel@induktiv.at>2015-03-04 20:30:50 +0100
commitdbe61b840aa5adabd64e54714f07553a4f1bc519 (patch)
tree1e88b0ce5f281ba676656bd52f57d1415959e0ef /activesupport/lib
parentb0edabf3be07f841781bc0b1743c401e666d2952 (diff)
downloadrails-dbe61b840aa5adabd64e54714f07553a4f1bc519.tar.gz
rails-dbe61b840aa5adabd64e54714f07553a4f1bc519.tar.bz2
rails-dbe61b840aa5adabd64e54714f07553a4f1bc519.zip
fixes documentation for returned hash in cache.fetch_multi
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/cache.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index fdef9cbfc0..d229ba52e2 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -353,8 +353,11 @@ module ActiveSupport
# Returns a hash with the data for each of the names. For example:
#
# cache.write("bim", "bam")
- # cache.fetch_multi("bim", "boom") { |key| key * 2 }
- # # => { "bam" => "bam", "boom" => "boomboom" }
+ # cache.fetch_multi("bim", "unknown_key") do |key|
+ # "Fallback value for key: #{key}"
+ # end
+ # # => { "bim" => "bam",
+ # # "unknown_key" => "Fallback value for key: unknown_key" }
#
def fetch_multi(*names)
options = names.extract_options!