Class: ActiveModel::Attribute::FromUser
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::ActiveModel::Attribute
|
|
Instance Chain:
self,
::ActiveModel::Attribute
|
|
Inherits: |
ActiveModel::Attribute
|
Defined in: | activemodel/lib/active_model/attribute.rb |
Class Method Summary
::ActiveModel::Attribute
- Inherited
.from_database, .from_user, | |
.new | This method should not be called directly. |
.null, .uninitialized, .with_cast_value |
Instance Attribute Summary
- #came_from_user? ⇒ Boolean readonly
::ActiveModel::Attribute
- Inherited
Instance Method Summary
::ActiveModel::Attribute
- Inherited
Constructor Details
This class inherits a constructor from ActiveModel::Attribute
Instance Attribute Details
#came_from_user? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'activemodel/lib/active_model/attribute.rb', line 202
def came_from_user? !type.value_constructed_by_mass_assignment?(value_before_type_cast) end
Instance Method Details
#_value_for_database (private)
[ GitHub ]# File 'activemodel/lib/active_model/attribute.rb', line 207
def _value_for_database Type::SerializeCastValue.serialize(type, value) end