method
cast_value
rails latest stable - Class:
ActiveRecord::ConnectionAdapters::PostgreSQL::OID::DateTime
cast_value(value)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time.rb, line 8
def cast_value(value)
case value
when "infinity" then ::Float::INFINITY
when "-infinity" then -::Float::INFINITY
when / BC$/
value = value.sub(/^\d+/) { |year| format("%04d", -year.to_i + 1) }
super(value.delete_suffix!(" BC"))
else
super
end
end