Fix use of ActiveRecord::Type::Boolean#type_cast_from_database

This method longer exists.
This commit is contained in:
Matt-Yorkley
2021-01-09 22:16:01 +00:00
parent 009844bfe7
commit c5feb19e5b

View File

@@ -122,7 +122,7 @@ module OpenFoodNetwork
end
def to_bool(value)
ActiveRecord::Type::Boolean.new.type_cast_from_database(value)
ActiveRecord::Type::Boolean.new.cast(value)
end
def to_local_datetime(date)