aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-10-07 16:13:33 -0300
committerEmilio Tagua <miloops@gmail.com>2010-11-19 19:08:12 -0300
commitda721dae1ea2cc7d33c32080aaaf86e34c91352d (patch)
tree64da35da630f460bda69476eb3c166f2533bc0a5 /activerecord/lib
parent003e4fb4cf7a2eabd60cceb4a1e0e857ada282f0 (diff)
downloadrails-da721dae1ea2cc7d33c32080aaaf86e34c91352d.tar.gz
rails-da721dae1ea2cc7d33c32080aaaf86e34c91352d.tar.bz2
rails-da721dae1ea2cc7d33c32080aaaf86e34c91352d.zip
Added config syntax to enable/disable identity map: config.active_record.identity_map = true
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/base.rb1
-rw-r--r--activerecord/lib/active_record/identity_map.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 47cfeb89ba..8a8166fb1c 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -425,6 +425,7 @@ module ActiveRecord #:nodoc:
delegate :find_each, :find_in_batches, :to => :scoped
delegate :select, :group, :order, :except, :limit, :offset, :joins, :where, :preload, :eager_load, :includes, :from, :lock, :readonly, :having, :create_with, :to => :scoped
delegate :count, :average, :minimum, :maximum, :sum, :calculate, :to => :scoped
+ delegate :identity_map=, :to => :identity_map
# Executes a custom SQL query against your database and returns all the results. The results will
# be returned as an array with columns requested encapsulated as attributes of the model you call
diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb
index b0ff88d8bf..6bf77c71fa 100644
--- a/activerecord/lib/active_record/identity_map.rb
+++ b/activerecord/lib/active_record/identity_map.rb
@@ -45,6 +45,7 @@ module ActiveRecord
end
alias enabled? enabled
+ alias identity_map= enabled=
end
self.repositories ||= Hash.new