Permalink
Browse files

Fix StatementCache docs format [ci skip]

  • Loading branch information...
1 parent b15ce4a commit 062d1f718943925debd3c4aae45a4b5e15b40632 Francesco Rodriguez committed Apr 11, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 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

0 comments on commit 062d1f7

Please sign in to comment.