Permalink
Browse files

Switched to new naming conventions

[ci skip]
  • Loading branch information...
1 parent 53d6cc0 commit dab82332c8866b967d1189c14aa0edc0a9fd09ae @olliwer olliwer committed with rafaelfranca Apr 11, 2013
Showing with 4 additions and 4 deletions.
  1. +3 −3 activerecord/CHANGELOG.md
  2. +1 −1 activerecord/lib/active_record/statement_cache.rb
@@ -1,13 +1,13 @@
## Rails 4.0.0 (unreleased) ##
* Added Statement Cache to allow the caching of a single statement. The cache works by
- duping the relation returned from yielding a statement which allows skipping the AST
- building phase.
+ duping the relation returned from yielding a statement, which allows skipping the AST
+ building phase for following executes. The cache returns results in array format.
Example:
cache = ActiveRecord::StatementCache.new do
- Book.where(:name => "my book").limit(100)
+ Book.where(name: "my book").limit(100)
end
books = cache.execute
@@ -4,7 +4,7 @@ module ActiveRecord
# 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)
+ # Book.where(name: "my book").limit(100)
# end
#
# The cached statement is executed by using the +execute+ method:

0 comments on commit dab8233

Please sign in to comment.