Sha256: 62630573a5b862c330c143f6279d2b987f62134ce01b6ae99e4ff8c6ae5755fd
Contents?: true
Size: 425 Bytes
Versions: 2
Compression:
Stored size: 425 Bytes
Contents
# frozen_string_literal: true require 'rails_compatibility' require 'rails_compatibility/active_record' class << RailsCompatibility if GTE_RAILS_5_0 # type_cast_from_database was changed to deserialize in Rails 5 def deserialize(type, attribute) type.deserialize(attribute) end else def deserialize(type, attribute) type.type_cast_from_database(attribute) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_compatibility-0.0.10 | lib/rails_compatibility/deserialize.rb |
rails_compatibility-0.0.9 | lib/rails_compatibility/deserialize.rb |