Methods on associations. I never knew you could include methods inside ActiveRecord associations:
``` class Book has_many :reviews do def featured = where(featured: true).first end end
book.reviews.featured ```
Recent articles
- Setting up Android phone to work with Apple Watch and iMessage - 11th June 2025
- with_defaults is a better named alias - 28th April 2025
- Bundler can be configured to auto install - 28th April 2025