Class: ActiveRecord::Attribute::WithCastValue

Inherits:
ActiveRecord::Attribute show all
Defined in:
lib/active_record/attribute.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from ActiveRecord::Attribute

#name, #type, #value_before_type_cast

Instance Method Summary collapse

Methods inherited from ActiveRecord::Attribute

#==, #came_from_user?, #changed_from?, from_database, from_user, #initialize, #initialized?, null, #original_value, uninitialized, #value, #value_for_database, with_cast_value, #with_cast_value, #with_value_from_database, #with_value_from_user

Constructor Details

This class inherits a constructor from ActiveRecord::Attribute

Instance Method Details

#changed_in_place_from?(old_value) ⇒ Boolean

Returns:

  • (Boolean)


123
124
125
# File 'lib/active_record/attribute.rb', line 123

def changed_in_place_from?(old_value)
  false
end

#type_cast(value) ⇒ Object



119
120
121
# File 'lib/active_record/attribute.rb', line 119

def type_cast(value)
  value
end