Sha256: e4b5c3e1c7a15449b592afafb5561e43bdc3b55f328b5b7bcc30ab2fd9d8a2a3
Contents?: true
Size: 531 Bytes
Versions: 20
Compression:
Stored size: 531 Bytes
Contents
module ActiveRecord module TypeCaster class Map # :nodoc: def initialize(types) @types = types end def type_cast_for_database(attr_name, value) return value if value.is_a?(Arel::Nodes::BindParam) type = types.type_for_attribute(attr_name.to_s) type.serialize(value) end # TODO Change this to private once we've dropped Ruby 2.2 support. # Workaround for Ruby 2.2 "private attribute?" warning. protected attr_reader :types end end end
Version data entries
20 entries across 20 versions & 1 rubygems