...
/Instance Methods Should Implement Domain Concepts from the DB
Instance Methods Should Implement Domain Concepts from the DB
Learn how instance methods should implement concepts from the database of our Rails application.
We'll cover the following...
Modeling derived data in Active Record methods
Outside of business logic, the most common area of trouble has to do with derived data—data whose value is based on the data in the database. We see this when we’re dealing with methods on an Active Record. Sometimes, this derived data is presentational and use case specific, but other times, it represents a true domain ...