From cdfcbc48b25ca76fb0aa821d5ee087768e0d6522 Mon Sep 17 00:00:00 2001 From: kennyj Date: Thu, 8 Mar 2012 00:00:58 +0900 Subject: Don't reset inheritance_column when setting explicitly. --- activerecord/lib/active_record/model_schema.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 99847ac161..c85d590ce1 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -160,6 +160,7 @@ module ActiveRecord # Sets the value of inheritance_column def inheritance_column=(value) @inheritance_column = value.to_s + @explicit_inheritance_column = true end def sequence_name @@ -303,7 +304,7 @@ module ActiveRecord @column_types = nil @content_columns = nil @dynamic_methods_hash = nil - @inheritance_column = nil + @inheritance_column = nil unless defined?(@explicit_inheritance_column) && @explicit_inheritance_column @relation = nil end -- cgit v1.2.3