instance method
cast_value
Ruby on Rails 8.0.4
Since v7.1.6 PrivateSignature
cast_value(value)
No documentation comment.
Parameters
-
valuereq
Source
# File activemodel/lib/active_model/type/string.rb, line 33
def cast_value(value)
case value
when ::String then ::String.new(value)
when true then @true
when false then @false
else value.to_s
end
end
Defined in activemodel/lib/active_model/type/string.rb line 33
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Type::String