#Active-Record
3 notas · última:
The Rails Model Introduction I Wish I Had
An overview of Rails models as the part of MVC that holds data logic, associations, methods, scopes, and validations, with examples centered on a library app.
How to isolate complex queries in an object oriented fashion – Alfredo Motta
The article shows how a talent-hunting app can move player search logic out of the active record model and into an `InterestingPlayer` query object, so domain-specific queries stay reusable and `TalentHunter` stays easier to read.
Everyone should be using low level caching in Rails
The post argues that low level caching in Rails is easy to start using and helps reduce database queries and API calls. It shows Rails.cache.fetch, cache key invalidation, and layered caching in practice.
