Sha256: 23e9516bb9c9ef88d93cfe946643d684fa78f07b792795d62891bdd9dd6dfe4c

Contents?: true

Size: 472 Bytes

Versions: 38

Compression:

Stored size: 472 Bytes

Contents

module ActiveModel
  module Type
    module Helpers
      module Mutable # :nodoc:
        def cast(value)
          deserialize(serialize(value))
        end

        # +raw_old_value+ will be the `_before_type_cast` version of the
        # value (likely a string). +new_value+ will be the current, type
        # cast value.
        def changed_in_place?(raw_old_value, new_value)
          raw_old_value != serialize(new_value)
        end
      end
    end
  end
end

Version data entries

38 entries across 37 versions & 5 rubygems

Version Path
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/helpers/mutable.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/helpers/mutable.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/helpers/mutable.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/helpers/mutable.rb
abaci-0.3.0 vendor/bundle/gems/activemodel-5.0.0/lib/active_model/type/helpers/mutable.rb
activemodel-5.0.1 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.1.rc2 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.1.rc1 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.1 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.rc2 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.racecar1 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.rc1 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.beta4 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.beta3 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.beta2 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.beta1.1 lib/active_model/type/helpers/mutable.rb
activemodel-5.0.0.beta1 lib/active_model/type/helpers/mutable.rb