Powerful Rails Features You Might Not Know
summary
Covers concrete Rails 7 and 7.1 features and how to use them: use excluding to drop records without raw SQL, enable strict_loading on associations to raise N+1 errors, and embed models via ActionText attachments using SGIDs. Shows generated columns, attr_readonly, with_options, custom Turbo Stream actions (browser notifications), ActionMailbox inbound reply handling, authenticate_by for timing-attack resistance, normalizes for setters, token generation with expiration, and Active Storage named variants with preprocessed background jobs. Examples include code snippets and end-to-end workflows that run in production.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 0:48Excluding users in Rails 7
- 2:12Strict loading in Active Record
- 3:41Generated columns in Rails
- 5:07Read-only attributes
- 5:48with_options in Active Support
- 6:51Safe navigation with try
- 7:32Embedding models with Action Text
- 11:50Serializing custom objects
- 12:56Action Mailbox for emails
- 15:24Routing constraints
- 16:53Devise routing contributions
- 17:38Drawing routes in separate files
- 18:43Custom Rails generators
- 20:50Custom Turbo Stream actions
- 22:59Active Support string helpers
- 24:24Time comparison helpers
- 26:08Date range helpers
- 27:11Abbreviated number formatting
- 31:06Rails 7.1 new features
- 32:08String inquiry in Rails
- 32:31Unused routes in Rails
- 33:13Template strict locals
- 34:38Normalizing attributes
- 35:43Secure password improvements
- 38:16Password challenge validation
- 38:38Token generation in Rails
- 39:43Active Storage variants
- 41:29Staying updated with Rails








