Sha256: 8d1e40e005c9dcec50cb2c701dce938f0dceab5ac2b6110f778a141eebb3e449
Contents?: true
Size: 550 Bytes
Versions: 17
Compression:
Stored size: 550 Bytes
Contents
# frozen_string_literal: true 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) case value when ::String then ::String.new(value) when true then "t" when false then "f" else value.to_s end end end end end
Version data entries
17 entries across 17 versions & 4 rubygems