Module: ActiveModel::Model::Interdependence::ClassMethods

Includes:
Interdependence::ActiveModel::ClassMethods
Defined in:
lib/activemodel/model/interdependence.rb

Overview

Extend ActiveModel::Model modules

Instance Method Summary collapse

Methods included from Interdependence::ActiveModel::ClassMethods

#validate, #validates_with

Instance Method Details

#active_model_validate(*args) ⇒ 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.

Expose Interdependence::ActiveModel::ClassMethods#validate‘s supermethod

Returns:

  • (undefined)


57
58
59
# File 'lib/activemodel/model/interdependence.rb', line 57

def active_model_validate(*args)
  super_method(:validate, *args)
end

#active_model_validates_with(*args) ⇒ 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.

Expose Interdependence::ActiveModel::ClassMethods#validates_with‘s supermethod

Returns:

  • (undefined)


47
48
49
# File 'lib/activemodel/model/interdependence.rb', line 47

def active_model_validates_with(*args)
  super_method(:validates_with, *args)
end

#included(base) ⇒ undefined

handle ActiveModel::Model includes

Examples:

usage is the same as active model


class MyModel
  include ActiveModel::Model
  validates :foo, bar: true
end

Returns:

  • (undefined)


36
37
38
39
# File 'lib/activemodel/model/interdependence.rb', line 36

def included(base)
  super
  base.include(::Interdependence::Model)
end