Module: ActiveModel::Model::Interdependence

Defined in:
lib/activemodel/model/interdependence.rb

Overview

Methods for monkey patching and extending ActiveModel::Model

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ undefined

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Patch ActiveModel::Model directly

Returns:

  • (undefined)

12
13
14
15
16
# File 'lib/activemodel/model/interdependence.rb', line 12

def self.included(base)
  super
  base.extend(ActiveModel::Validations::ClassMethods)
  base.singleton_class.prepend(ClassMethods)
end