aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-07 17:33:40 +0200
committerJosé Valim <jose.valim@gmail.com>2011-05-07 17:33:40 +0200
commit5d6c8d5e9d1c6544f8db8639e3a53a8d7682eeb2 (patch)
treecfe6165eadd5b11d41d0b057618e7071847a030d /activerecord/lib/active_record/base.rb
parent00a1152fa79808dfa86a516fe150911297f7aa58 (diff)
downloadrails-5d6c8d5e9d1c6544f8db8639e3a53a8d7682eeb2.tar.gz
rails-5d6c8d5e9d1c6544f8db8639e3a53a8d7682eeb2.tar.bz2
rails-5d6c8d5e9d1c6544f8db8639e3a53a8d7682eeb2.zip
Revert "Revert the merge because tests did not pass."
This reverts commit 886818d2bab40585c0cea763002ffc16917dd0b3.
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rw-r--r--activerecord/lib/active_record/base.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 6149865f80..1fe867495d 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -830,6 +830,10 @@ module ActiveRecord #:nodoc:
@symbolized_base_class ||= base_class.to_s.to_sym
end
+ def symbolized_sti_name
+ @symbolized_sti_name ||= sti_name ? sti_name.to_sym : symbolized_base_class
+ end
+
# Returns the base AR subclass that this class descends from. If A
# extends AR::Base, A.base_class will return A. If B descends from A
# through some arbitrarily deep hierarchy, B.base_class will return A.