aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2013-04-13 23:55:33 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2013-04-13 23:55:33 +0530
commit130d3a06ade83aec27cf1d2ff841dce9e0ad4dfd (patch)
treebf282263768a0d05ab50638cc04ea0f39928f8b3 /activerecord
parent48e9ff75c4a84a3edd0dedf4ec5aa5bc84462401 (diff)
parente890a69500531d5fcca0ad6617ace044ee62bf93 (diff)
downloadrails-130d3a06ade83aec27cf1d2ff841dce9e0ad4dfd.tar.gz
rails-130d3a06ade83aec27cf1d2ff841dce9e0ad4dfd.tar.bz2
rails-130d3a06ade83aec27cf1d2ff841dce9e0ad4dfd.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/attribute_methods/serialization.rb4
-rw-r--r--activerecord/lib/active_record/statement_cache.rb10
2 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb
index ae49fd4b88..7f1ebab4cd 100644
--- a/activerecord/lib/active_record/attribute_methods/serialization.rb
+++ b/activerecord/lib/active_record/attribute_methods/serialization.rb
@@ -93,10 +93,10 @@ module ActiveRecord
# This is only added to the model when serialize is called, which
# ensures we do not make things slower when serialization is not used.
- module Behavior #:nodoc:
+ module Behavior # :nodoc:
extend ActiveSupport::Concern
- module ClassMethods
+ module ClassMethods # :nodoc:
def initialize_attributes(attributes, options = {})
serialized = (options.delete(:serialized) { true }) ? :serialized : :unserialized
super(attributes, options)
diff --git a/activerecord/lib/active_record/statement_cache.rb b/activerecord/lib/active_record/statement_cache.rb
index 8c4b4f666b..dd4ee0c4a0 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 the block 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