aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-07 17:46:44 +0200
committerJosé Valim <jose.valim@gmail.com>2011-05-07 17:46:44 +0200
commitba23bf43f224845d38b2483d68c0daf698a1c512 (patch)
tree4a1c63a8bd6d4eeb48758ab497afe30ecc67202b /activerecord/lib
parent5d6c8d5e9d1c6544f8db8639e3a53a8d7682eeb2 (diff)
downloadrails-ba23bf43f224845d38b2483d68c0daf698a1c512.tar.gz
rails-ba23bf43f224845d38b2483d68c0daf698a1c512.tar.bz2
rails-ba23bf43f224845d38b2483d68c0daf698a1c512.zip
Class.new.name returns an empty string on 1.8
Diffstat (limited to 'activerecord/lib')
-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 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