This book is somewhat timeless, however it has had changes over the years. Note that if you purchased an e-book version from me, you will get updated versions for free as they come out. Note that this may not include releases that correct typos.
January 1, 2025 (current)
This is updated for Rails 8 and Ruby 3.4.
- General Changes
- Examples testing and working with Rails 8 and Ruby 3.4.
- Use Valkey instead of Redis, since Valkey is open source.
- Re-ordered this section to show recent changes first.
- OpenStruct requires require "ostruct" now.
- Chapter 4
- Brakeman is included with Rails.
- Chapter 9
- Added additional caveats around functional CSS with respect to custom elements and managing re-use.
- Removed Tachyons in favor of very basic CSS needed for the app. Since Sprockets is no longer included in Rails and since Tachyons cannot easily be overridden without additional tooling, it seemed easier to re-focus the CSS section on the concept of a design system and style guide. I did consider replacing Tachyons with TailwindCSS, since that is currently popular, but it brought in a ton of complexity that would require a lot of explanation not relevant to the overall focus of the chapter.
- Included a new subsection emphasizing just how difficult CSS is to manage and to not underestimate it.
- Chapter 10
- Changed use of
setProgressBarDelay
toprogressBarDelay
(fromTurbo.config.drive
), per deprecation warnings in the JavaScript console.
- Changed use of
- Chapter 11
- Changed the vanilla JS section to use HTML Custom Elements, which should be the preferred approach when not using a frame- work.
- Chapter 14
- Expanded on
TIMESTAMPTZ
to explain the care needed in changing the default type for an existing app.
- Expanded on
- Chapter 19
- Changed installation of Foreman to happen inside
bin/setup
instead of from theGemfile
, per advice from Foreman’s docs. - Section with thoughts on how to think about Solid Queue.
- Changed installation of Foreman to happen inside
- Chapter 20
- Changed recommendations and thoughts around Action Cable and Active Storage.
- Chapter 24
- Added section on how to decide if you should use the included
Dockerfile
and/or Kamal.
- Added section on how to decide if you should use the included
December 4, 2023
- General Changes
- Updated for Rails 7.1.
- Updated for Ruby 3.2
- Added explicit language in each section about where to find the sample code for that section.
- New cover
- No more
.mobi
version since Amazon discontinued it (see my website for how to read an ePub on the Kindle) - Additional larger-text PDF versions
- Chapter 1
- Update my experience, given the passage of time.
- Chapter 4
- Remove mention of Spring and Listen, since they aren't included and haven't been in a few versions.
- Remove mention of having to add the rexml gem, since selenium-webdriver brings it in.
- Change
bin/run
tobin/dev
, since this matches what Rails does (sometimes). - Remove mention of having to
bundle update
Thor. - Added help flags to the various
bin/
scripts.
- Chapter 5
- Added a new section that references “Patterns of Enterprise Application Architecture”, since this where the active record pattern originated.
- Chapter 7
- Recommend the use of View Components
- Recommend strict locals for partials
- Chapter 8
- Clarify that helpers can be made to be modular, and discuss configuring Rails to either treat them that way or to not generate falsely-modular helpers.
- More strongly discourage presenter-like libraries, and remove a lot of content around managing them.
- In place of presenters, discuss how using Active Model or View Components can manage complexity instead of gobs of helpers.
- Chapter 9
- Clear warning about Tailwind's lack of built-in design system and what you should consider if adopting it.
- Chapter 11
- Qualify the recommendation for Hotwire given that 37 Signals have made it clear they will change it however they like whenever they like.
- Chapter 15
- Reference “Patterns of Enterprise Application Architecture” and its definition of a service layer, which is what this chapter describes.
- Make it clear that the term “Service Objects” is not a service layer and is actually just another name for the command pattern (and that you should not use this pattern).
- Chapter 16
- Replace use of
before_validation
callback with the newnormalizes
macro - Make a stronger case for not using callbacks by clarifying exactly what they do and are for.
- Replace use of
- Chapter 17
- Replace the re-usable partial with a View Component in the example.
- Chapter 23
- Show code to monkey-patch Thor to make it useful for Rails generators.
- Chapter 24
- Use
CurrentAttributes
store information for the log instead of thread local storage. - Discuss the need to revisit security practices, along wit an anecdote from a previous job.
- Use
- Appendix A
- Re-work Docker stuff based on updated learnings and code.
- Explainer on getting your own shell aliases or software into the dev container.
March 15, 2022
- Updated for Rails 7
- Removal of all NodeJS-related stuff, including removal and re-thinking of the value of unit-testing JavaScript.
- Softened language around using React by default given Hotwire's existence.
- Changed guidance around nested routes to account for content-heavy marketing pages.
- Clarified the use of controller instance variables for managing UI state.
- Links to gems extracted from code based on the book.
January 21, 2021
- No need to disable Ajax form submissions by default, since Rails 6.1 changed the default behavior.
- Use of
add_check_constraint
andadd_index
instead of SQL wrapped inreversible
. - Fixed color issues with sidebars on some e-readers
Dec 12, 2020
- Updated for Rails 6.1 to remove deprecated method of setting errors on Active Records