aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/statement_cache.rb
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2013-04-11 12:33:36 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2013-04-11 12:33:36 -0500
commit062d1f718943925debd3c4aae45a4b5e15b40632 (patch)
tree7ff5f955bf38fe63fdd8ec1f3a2cf8fbeb4a3d2e /activerecord/lib/active_record/statement_cache.rb
parentb15ce4a006756a0b6cacfb9593d88c9a7dfd8eb0 (diff)
downloadrails-062d1f718943925debd3c4aae45a4b5e15b40632.tar.gz
rails-062d1f718943925debd3c4aae45a4b5e15b40632.tar.bz2
rails-062d1f718943925debd3c4aae45a4b5e15b40632.zip
Fix StatementCache docs format [ci skip]
Diffstat (limited to 'activerecord/lib/active_record/statement_cache.rb')
-rw-r--r--activerecord/lib/active_record/statement_cache.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/statement_cache.rb b/activerecord/lib/active_record/statement_cache.rb
index 8c4b4f666b..731871d643 100644
--- a/activerecord/lib/active_record/statement_cache.rb
+++ b/activerecord/lib/active_record/statement_cache.rb
@@ -3,15 +3,15 @@ module ActiveRecord
# Statement cache is used to cache a single statement in order to avoid creating the AST again.
# Initializing the cache is done by passing the statement in the initialization block:
#
- # cache = ActiveRecord::StatementCache.new do
- # Book.where(name: "my book").limit(100)
- # end
+ # cache = ActiveRecord::StatementCache.new do
+ # Book.where(name: "my book").limit(100)
+ # end
#
# The cached statement is executed by using the +execute+ method:
#
- # cache.execute
+ # cache.execute
#
- # The relation returned by yield is cached, and for each +execute+ call the cached relation gets duped.
+ # The relation returned by +yield+ is cached, and for each +execute+ call the cached relation gets duped.
# Database is queried when +to_a+ is called on the relation.
class StatementCache
def initialize