From ba23bf43f224845d38b2483d68c0daf698a1c512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 7 May 2011 17:46:44 +0200 Subject: Class.new.name returns an empty string on 1.8 --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 1fe867495d..78318b1be0 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -831,7 +831,7 @@ module ActiveRecord #:nodoc: end def symbolized_sti_name - @symbolized_sti_name ||= sti_name ? sti_name.to_sym : symbolized_base_class + @symbolized_sti_name ||= sti_name.present? ? sti_name.to_sym : symbolized_base_class end # Returns the base AR subclass that this class descends from. If A -- cgit v1.2.3