Module: Polo::SqlTranslator::ActiveRecordLessThanFourPointTwo
- Included in:
- Polo::SqlTranslator
- Defined in:
- lib/polo/sql_translator.rb
Instance Method Summary collapse
Instance Method Details
#cast_attribute(record, column, value) ⇒ Object
68 69 70 71 72 73 74 75 76 |
# File 'lib/polo/sql_translator.rb', line 68 def cast_attribute(record, column, value) attribute = record.send(:type_cast_attribute_for_write, column, value) if record.class.serialized_attributes.include?(column.name) attribute.serialize else attribute end end |