This is likely related to the Rails upgrade. When creating a new Pattern, the serializer is expecting a Hash, but was instead getting an ActionController::Parameters object. Since Mongo didn't know how to serialize that, it was throwing an HTTP 500 error like this:
BSON::Error::UnserializableClass - Value does not define its BSON serialized type: {"id"=>4853, "category"=>"foods", "label"=>"Soy flour, full-fat, roasted"}
This is likely related to the Rails upgrade. When creating a new Pattern, the serializer is expecting a Hash, but was instead getting an
ActionController::Parameters
object. Since Mongo didn't know how to serialize that, it was throwing an HTTP 500 error like this:Casting it to a hash makes it serializable.