diff options
author | kennyj <kennyj@gmail.com> | 2012-03-08 00:00:58 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-03-08 00:00:58 +0900 |
commit | cdfcbc48b25ca76fb0aa821d5ee087768e0d6522 (patch) | |
tree | 6e313fe89b1e7e1180808acc4fde7b96e967309c /activerecord/lib/active_record | |
parent | 7638004d7d23df668ec33a3c570b7865e0d06a06 (diff) | |
download | rails-cdfcbc48b25ca76fb0aa821d5ee087768e0d6522.tar.gz rails-cdfcbc48b25ca76fb0aa821d5ee087768e0d6522.tar.bz2 rails-cdfcbc48b25ca76fb0aa821d5ee087768e0d6522.zip |
Don't reset inheritance_column when setting explicitly.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/model_schema.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |