From da721dae1ea2cc7d33c32080aaaf86e34c91352d Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Thu, 7 Oct 2010 16:13:33 -0300 Subject: Added config syntax to enable/disable identity map: config.active_record.identity_map = true --- activerecord/lib/active_record/base.rb | 1 + activerecord/lib/active_record/identity_map.rb | 1 + 2 files changed, 2 insertions(+) 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 -- cgit v1.2.3