December 2025
Intermediate to advanced
452 pages
9h 7m
English
This chapter finishes the journey of reducing Active Record models’ responsibility by discussing representation-specific logic, which we sometimes put into our model classes. First, we will consider view template-related helpers and how we can extract them into decorating objects or presenters. Then, we will discuss the concept of serialization in API-only applications and how we can organize the corresponding logic using serializers.
We will cover the following topics:
The aim of this chapter is to show you how to extract representation-related logic from models to eliminate coupling introduced by mixing presentation ...
Read now
Unlock full access