Permalink
Browse files

Class.new.name returns an empty string on 1.8

  • Loading branch information...
1 parent 5d6c8d5 commit ba23bf43f224845d38b2483d68c0daf698a1c512 @josevalim josevalim committed May 7, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
@@ -831,7 +831,7 @@ def symbolized_base_class
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

0 comments on commit ba23bf4

Please sign in to comment.