mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Fix all the errors to get our tests green on Rails 5.1.
This commit is contained in:
@ -77,7 +77,7 @@ class SqlBuilder
|
||||
def decode(string, tuple = nil, field = nil)
|
||||
if Rails.version >= "4.2.0"
|
||||
@caster ||= ActiveRecord::Type::DateTime.new
|
||||
@caster.type_cast_from_database(string)
|
||||
@caster.cast(string)
|
||||
else
|
||||
ActiveRecord::ConnectionAdapters::Column.string_to_time string
|
||||
end
|
||||
|
Reference in New Issue
Block a user