Active Model and its modules
How to make an object comply with the Active Model API required by Rails
Rails’s validators and Ruby-constant lookup
In the previous chapter, we talked briefly about Abstract Controller and how it reduced code duplication in the Rails source code since it’s decoupled from both Action Mailer and Action Controller. Now let’s look at Active Model, which is similar.
Active Model was originally created to hold the behavior shared between Active Record and Active Resource. As with Abstract Controller, the desired functionalities can be cherry-picked by including only the modules you need. Active Model is also responsible for defining the application programming interface ...