Module: OData::Model::ActiveModel

Extended by:
ActiveModel::Naming, ActiveSupport::Concern
Includes:
ActiveModel::Conversion, ActiveModel::Validations
Included in:
OData::Model
Defined in:
lib/odata/model/active_model.rb

Overview

The OData::Model::ActiveModel module encapsulates all the functionality specifically needed for OData::Model to work with Rails via the ActiveModel conventions.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#errorsActiveModel::Errors

Integrates ActiveModel's error handling capabilities

Returns:

  • (ActiveModel::Errors)

22
23
24
# File 'lib/odata/model/active_model.rb', line 22

def errors
  @errors ||= ::ActiveModel::Errors.new(self)
end

#read_attribute_for_validation(attr) ⇒ Object

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.

Used for ActiveModel validations


28
29
30
# File 'lib/odata/model/active_model.rb', line 28

def read_attribute_for_validation(attr)
  send(attr)
end