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
-
#errors ⇒ ActiveModel::Errors
Integrates ActiveModel’s error handling capabilities.
-
#read_attribute_for_validation(attr) ⇒ Object
private
Used for ActiveModel validations.
Instance Method Details
#errors ⇒ ActiveModel::Errors
Integrates ActiveModel’s error handling capabilities
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 |