Our API backend service relies heavily on ActiveModel::Serializer for building response objects. We are using version 0.8 which hasn’t been updated for many years. As part of the effort of upgrading our service to Rails 5 (and eventually Rails 6), we start to seek ways to upgrade active_model_serializers. ActiveModel::Serializers From 0.8 to 0.10 The first candidate is the latest 0.10 of active_model_serializers. On one hand, our benchmark shows some really good performance improvement. In ...| Tech Notes from Steven
In this tutorial you are going to learn how to pass extra data to your serializer, before saving it to the database. Introduction Example Using APIView Example Using ViewSet Introduction When using regular Django forms, there is this common pattern where we save the form with commit=False and then pass some extra data to the instance before saving it to the database, like this: form=InvoiceForm(request.POST)ifform.is_valid():invoice=form.save(commit=False)invoice.user=request.userinvoice.save...| Simple is Better Than Complex
I wrote an IMAP parsing and serialization library and want to make it correct and misuse resistant by leveraging Rust's type system.| Duesee's Blog