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.
December 4, 2023 (current)
- 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