diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/acts/list.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/acts/nested_set.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/acts/tree.rb | 3 | ||||
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 3 | ||||
-rwxr-xr-x | activerecord/lib/active_record/callbacks.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/locking.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/observer.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/timestamp.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/transactions.rb | 3 | ||||
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/wrappings.rb | 3 |
11 files changed, 11 insertions, 24 deletions
diff --git a/activerecord/lib/active_record/acts/list.rb b/activerecord/lib/active_record/acts/list.rb index 0e0e1e4f36..6d235967c6 100644 --- a/activerecord/lib/active_record/acts/list.rb +++ b/activerecord/lib/active_record/acts/list.rb @@ -1,8 +1,7 @@ module ActiveRecord module Acts #:nodoc: module List #:nodoc: - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) end diff --git a/activerecord/lib/active_record/acts/nested_set.rb b/activerecord/lib/active_record/acts/nested_set.rb index 8b02b358a9..9d5bcf4d3d 100644 --- a/activerecord/lib/active_record/acts/nested_set.rb +++ b/activerecord/lib/active_record/acts/nested_set.rb @@ -1,8 +1,7 @@ module ActiveRecord module Acts #:nodoc: module NestedSet #:nodoc: - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) end diff --git a/activerecord/lib/active_record/acts/tree.rb b/activerecord/lib/active_record/acts/tree.rb index c5aa4cd22d..b8654ce4e6 100644 --- a/activerecord/lib/active_record/acts/tree.rb +++ b/activerecord/lib/active_record/acts/tree.rb @@ -1,8 +1,7 @@ module ActiveRecord module Acts #:nodoc: module Tree #:nodoc: - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) end diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 2861a3940b..98f4e43883 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -77,8 +77,7 @@ module ActiveRecord end module Associations # :nodoc: - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) end diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 2ffb52ad00..26d8bfa7b6 100755 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -170,9 +170,7 @@ module ActiveRecord after_validation_on_update before_destroy after_destroy ) - def self.append_features(base) #:nodoc: - super - + def self.included(base) #:nodoc: base.extend(ClassMethods) base.class_eval do class << self diff --git a/activerecord/lib/active_record/locking.rb b/activerecord/lib/active_record/locking.rb index ca83a98b30..3e0c47e706 100644 --- a/activerecord/lib/active_record/locking.rb +++ b/activerecord/lib/active_record/locking.rb @@ -21,8 +21,7 @@ module ActiveRecord # To override the name of the lock_version column, invoke the <tt>set_locking_column</tt> method. # This method uses the same syntax as <tt>set_table_name</tt> module Locking - def self.append_features(base) #:nodoc: - super + def self.included(base) #:nodoc: base.class_eval do alias_method :update_without_lock, :update alias_method :update, :update_with_lock diff --git a/activerecord/lib/active_record/observer.rb b/activerecord/lib/active_record/observer.rb index 97aa58872a..8fe71f82f5 100644 --- a/activerecord/lib/active_record/observer.rb +++ b/activerecord/lib/active_record/observer.rb @@ -2,8 +2,7 @@ require 'singleton' module ActiveRecord module Observing # :nodoc: - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) end diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb index 3c947f0eb6..44936a1432 100644 --- a/activerecord/lib/active_record/timestamp.rb +++ b/activerecord/lib/active_record/timestamp.rb @@ -6,9 +6,7 @@ module ActiveRecord # This behavior can be turned off by setting <tt>ActiveRecord::Base.record_timestamps = false</tt>. # This behavior by default uses local time, but can use UTC by setting <tt>ActiveRecord::Base.default_timezone = :utc</tt> module Timestamp - def self.append_features(base) # :nodoc: - super - + def self.included(base) # :nodoc: base.class_eval do alias_method :create_without_timestamps, :create alias_method :create, :create_with_timestamps diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index 2c5692c036..01bbdf4c8a 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -9,8 +9,7 @@ module ActiveRecord class TransactionError < ActiveRecordError # :nodoc: end - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) base.class_eval do diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index d416773464..d66c5934fb 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -214,8 +214,7 @@ module ActiveRecord module Validations VALIDATIONS = %w( validate validate_on_create validate_on_update ) - def self.append_features(base) # :nodoc: - super + def self.included(base) # :nodoc: base.extend ClassMethods base.class_eval do alias_method :save_without_validation, :save diff --git a/activerecord/lib/active_record/wrappings.rb b/activerecord/lib/active_record/wrappings.rb index 01976417b7..e8b6018850 100644 --- a/activerecord/lib/active_record/wrappings.rb +++ b/activerecord/lib/active_record/wrappings.rb @@ -9,8 +9,7 @@ module ActiveRecord end end - def self.append_features(base) - super + def self.included(base) base.extend(ClassMethods) end |