diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-30 14:22:09 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-30 14:37:04 -0700 |
commit | fb4ee9c7e5da783d84d3a633297830ceac58ee48 (patch) | |
tree | 4e7f821afcaef1471ecc4f3e3cb4f3f2e8b82f4c | |
parent | ef6df93a8ddb675f1298973bb347825c554e95f9 (diff) | |
download | rails-fb4ee9c7e5da783d84d3a633297830ceac58ee48.tar.gz rails-fb4ee9c7e5da783d84d3a633297830ceac58ee48.tar.bz2 rails-fb4ee9c7e5da783d84d3a633297830ceac58ee48.zip |
type_name is never a blank string, so use faster .nil? call
-rw-r--r-- | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 9204295d8c..aed4eff565 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.blank? || !columns_hash.include?(inheritance_column) + if type_name.nil? || !columns_hash.include?(inheritance_column) self else begin |