diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/acts/list.rb | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/acts/tree.rb | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/aggregations.rb | 5 | ||||
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/wrappings.rb | 5 |
5 files changed, 25 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/acts/list.rb b/activerecord/lib/active_record/acts/list.rb index c6a33cf9a0..abd295d4e9 100644 --- a/activerecord/lib/active_record/acts/list.rb +++ b/activerecord/lib/active_record/acts/list.rb @@ -1,6 +1,11 @@ module ActiveRecord module Acts #:nodoc: module List #:nodoc: + def self.append_features(base) + super + base.extend(ClassMethods) + end + # This act provides the capabilities for sorting and reordering a number of objects in list. # The class that has this specified needs to have a "position" column defined as an integer on # the mapped database table. diff --git a/activerecord/lib/active_record/acts/tree.rb b/activerecord/lib/active_record/acts/tree.rb index 5fd1a59334..61163941d3 100644 --- a/activerecord/lib/active_record/acts/tree.rb +++ b/activerecord/lib/active_record/acts/tree.rb @@ -1,6 +1,11 @@ module ActiveRecord module Acts #:nodoc: module Tree #:nodoc: + def self.append_features(base) + super + base.extend(ClassMethods) + end + # Specify this act if you want to model a tree structure by providing a parent association and an children # association. This act assumes that requires that you have a foreign key column, which by default is called parent_id. # diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb index 6141d2d535..208dc35321 100644 --- a/activerecord/lib/active_record/aggregations.rb +++ b/activerecord/lib/active_record/aggregations.rb @@ -1,5 +1,10 @@ module ActiveRecord module Aggregations # :nodoc: + def self.append_features(base) + super + base.extend(ClassMethods) + end + # Active Record implements aggregation through a macro-like class method called +composed_of+ for representing attributes # as value objects. It expresses relationships like "Account [is] composed of Money [among other things]" or "Person [is] # composed of [an] address". Each call to the macro adds a description on how the value objects are created from the diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 7ce06f9c37..5bdc6247ff 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -8,6 +8,11 @@ require 'active_record/deprecated_associations' module ActiveRecord module Associations # :nodoc: + def self.append_features(base) + super + base.extend(ClassMethods) + end + # Clears out the association cache def clear_association_cache #:nodoc: self.class.reflect_on_all_associations.to_a.each do |assoc| diff --git a/activerecord/lib/active_record/wrappings.rb b/activerecord/lib/active_record/wrappings.rb index 1284450994..01976417b7 100644 --- a/activerecord/lib/active_record/wrappings.rb +++ b/activerecord/lib/active_record/wrappings.rb @@ -9,6 +9,11 @@ module ActiveRecord end end + def self.append_features(base) + super + base.extend(ClassMethods) + end + class AbstractWrapper #:nodoc: def self.wrap(attribute, record_binding) #:nodoc: %w( before_save after_save after_initialize ).each do |callback| |