aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-30 16:02:49 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-30 16:03:05 -0700
commit0238228e5d3ce1747a6f1d618693ffd44f947561 (patch)
tree06188a3d15aa7db2288aad0aac06aee68d087e6b /activerecord/lib/active_record/base.rb
parent15419a5dc692be997d7637e40435a3d0d0fa4c1c (diff)
downloadrails-0238228e5d3ce1747a6f1d618693ffd44f947561.tar.gz
rails-0238228e5d3ce1747a6f1d618693ffd44f947561.tar.bz2
rails-0238228e5d3ce1747a6f1d618693ffd44f947561.zip
type_name should check for blank because people may have messed up databases
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rw-r--r--activerecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index aed4eff565..9204295d8c 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -890,7 +890,7 @@ module ActiveRecord #:nodoc:
end
def find_sti_class(type_name)
- if type_name.nil? || !columns_hash.include?(inheritance_column)
+ if type_name.blank? || !columns_hash.include?(inheritance_column)
self
else
begin