aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/inheritance.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2013-05-27 14:51:06 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2013-05-27 14:58:43 -0400
commit04f00c62178ac94deab3d5541c0a53fa60dd35ea (patch)
tree6ca43c56e3c62c561804d6e2367071022d8b1c99 /activerecord/lib/active_record/inheritance.rb
parent952f0faf921b5dc470c6d0cc2f1c871c3310b031 (diff)
downloadrails-04f00c62178ac94deab3d5541c0a53fa60dd35ea.tar.gz
rails-04f00c62178ac94deab3d5541c0a53fa60dd35ea.tar.bz2
rails-04f00c62178ac94deab3d5541c0a53fa60dd35ea.zip
minor comments cleanup
Diffstat (limited to 'activerecord/lib/active_record/inheritance.rb')
-rw-r--r--activerecord/lib/active_record/inheritance.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/inheritance.rb b/activerecord/lib/active_record/inheritance.rb
index 40976bc29e..e826762def 100644
--- a/activerecord/lib/active_record/inheritance.rb
+++ b/activerecord/lib/active_record/inheritance.rb
@@ -5,7 +5,7 @@ module ActiveRecord
extend ActiveSupport::Concern
included do
- # Determine whether to store the full constant name including namespace when using STI
+ # Determines whether to store the full constant name including namespace when using STI.
class_attribute :store_full_sti_class, instance_writer: false
self.store_full_sti_class = true
end
@@ -13,7 +13,7 @@ module ActiveRecord
module ClassMethods
# Determines if one of the attributes passed in is the inheritance column,
# and if the inheritance column is attr accessible, it initializes an
- # instance of the given subclass instead of the base class
+ # instance of the given subclass instead of the base class.
def new(*args, &block)
if abstract_class? || self == Base
raise NotImplementedError, "#{self} is an abstract class and can not be instantiated."
@@ -27,7 +27,8 @@ module ActiveRecord
super
end
- # True if this isn't a concrete subclass needing a STI type condition.
+ # Returns +true+ if this does not need STI type condition. Returns
+ # +false+ if STI type condition needs to be applied.
def descends_from_active_record?
if self == Base
false