method
string_to_time
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::PostgreSQLColumn::Cast
string_to_time(string)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/postgresql/cast.rb, line 16
def string_to_time(string)
return string unless String === string
case string
when 'infinity'; 1.0 / 0.0
when '-infinity'; -1.0 / 0.0
when / BC$/
super("-" + string.sub(/ BC$/, ""))
else
super
end
end