Tricks That Rails Didn't Tell You About
summary
Shows concrete Rails features and exact code outcomes: reversible migrations instead of verbose change_column, merging model scopes to avoid duplicated where clauses, where.not for clear negation, choosing includes vs preload vs joins to control queries, using pluck/distinct for lightweight selects, to_param slugging and its truncation, present vs exists to avoid extra queries, ActiveModel::Model for form objects, mailer i18n helpers for subjects, content_tag :for and partial locals hash, console helpers and sandbox, and rails:update to diff and install new config files.
AI-written summary · about
chapters (14)
- 0:00Start
- 8:43migrations: change column null
- 9:54migrations: change column default
- 14:16eager load strategies
- 20:54benchmark
- 22:56ActiveModel:Model
- 26:47content_tag_for
- 27:44render empty collections
- 28:33partial locals
- 31:47exceptions handling
- 33:30application console helpers
- 34:05console sandbox
- 34:59custom annotations
- 35:35rails update
related talks
42mPowerful Rails Features You Might Not Know
42mTen Things You Didn't Know Rails Could Do
31mRails Flavored Ruby
24mThe Rails Features we Loved, Lost, and Laughed at
26mDon't Rewrite Your Framework
38mRails on Ruby: How Ruby Makes Rails Great
31mTricks and treats for new developers
26mDissecting Rails - a different approach to learning Rails
