Permalink
Browse files

type_name is never a blank string, so use faster .nil? call

  • Loading branch information...
tenderlove committed Sep 30, 2010
1 parent ea63054 commit 7e73344f7ae2f227c6961abe78a40fa6f991c25c
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
@@ -911,7 +911,7 @@ def instantiate(record)
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

0 comments on commit 7e73344

Please sign in to comment.