Class: ActiveRecord::ConnectionAdapters::MysqlAdapter::Fields::Decimal

Inherits:
Type
  • Object
show all
Defined in:
activerecord/lib/active_record/connection_adapters/mysql_adapter.rb

Instance Method Summary collapse

Methods inherited from Type

#type, #type_cast_for_write

Instance Method Details

#type_cast(value) ⇒ Object



365
366
367
368
369
# File 'activerecord/lib/active_record/connection_adapters/mysql_adapter.rb', line 365

def type_cast(value)
  return if value.nil?

  ConnectionAdapters::Column.value_to_decimal value
end