Sha256: 702ebefd69ddd4b1bd64d3aca3e177cd90adfc4006c7e41ae657f8f6b46808be

Contents?: true

Size: 374 Bytes

Versions: 27

Compression:

Stored size: 374 Bytes

Contents

require "active_model/type/immutable_string"

module ActiveModel
  module Type
    class String < ImmutableString # :nodoc:
      def changed_in_place?(raw_old_value, new_value)
        if new_value.is_a?(::String)
          raw_old_value != new_value
        end
      end

      private

      def cast_value(value)
        ::String.new(super)
      end
    end
  end
end

Version data entries

27 entries across 26 versions & 5 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/activemodel-5.0.2/lib/active_model/type/string.rb
tdiary-5.0.5 vendor/bundle/gems/activemodel-5.0.2/lib/active_model/type/string.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activemodel-5.0.2/lib/active_model/type/string.rb
tdiary-5.0.4 vendor/bundle/gems/activemodel-5.0.2/lib/active_model/type/string.rb
activemodel-5.0.2 lib/active_model/type/string.rb
activemodel-5.0.2.rc1 lib/active_model/type/string.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/string.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/string.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/string.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/string.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/string.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/string.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activemodel-5.0.1/lib/active_model/type/string.rb
abaci-0.3.0 vendor/bundle/gems/activemodel-5.0.0/lib/active_model/type/string.rb
activemodel-5.0.1 lib/active_model/type/string.rb
activemodel-5.0.1.rc2 lib/active_model/type/string.rb
activemodel-5.0.1.rc1 lib/active_model/type/string.rb
activemodel-5.0.0.1 lib/active_model/type/string.rb
activemodel-5.0.0 lib/active_model/type/string.rb
activemodel-5.0.0.rc2 lib/active_model/type/string.rb