Active Record overview – persistence and beyond
Ruby on Rails as a framework consists of multiple components or sub-frameworks, each playing a role in various web application processes (for example, serving HTTP requests or executing background tasks). Components include Action Pack, Action Cable, Action View, Active Job, and more—the list changes as Rails matures; some sub-frameworks are being retired (such as Action Web Service), while others are joining the family.
Among the moving parts, there are constants, and in Rails, such constants are Action Pack and Active Record. Action Pack is responsible for the HTTP layer (rack and controllers), which was discussed in Chapter 1, Rails as a Web Application Framework. Active Record’s responsibility is for the model layer, which we will cover in this chapter.
Action or Active?
How do maintainers decide which prefix to use for a new component: Action or Active? The rule is not set in stone, but a pattern is...