Hi there! This is Andy with another edition of This Week in Rails. This week we're covering two weeks worth of changes, so let's dive right in.
New
This change breaks out two Action Controller hooks, where there was one before. `action_controller_base` and `action_controller_api`. These can be used to load less code at boot time.
Do you need to load all the fixtures of a particular type? Calling a fixture accessor method with no arguments returns all fixtures.
Add `fetch_values` for `HashWithIndifferentAccess` in Rails, added to Ruby in 2.3.0. Support was added conditionally by using `method_defined?`.
Fixed
If your app uses a lot of database connections, this one is worth a look. The author said that after deploying this change, they reduced their peak open database connection count by 13%.
This change restores the ability to accept ecmascript for parsing. The author also declares that the JS response should not modify the DOM. Take a look!
Improved
Did you know that `before_destroy` hooks should be set *before* `dependent: destroy` for it to work correctly? This documents that.
Check this out if you're curious about changes around frozen strings and usages of Immutable String (Matz said "All String literals are immutable (frozen) on Ruby 3").
Whew! That covers just some of the changes in the first couple of weeks of April. Many other great pull requests are available to browse, from 27 contributors including 5 first-timers. Nice work!

Until next week!
Godfrey Chan · #303 - 210 Carrall St · Vancouver V6B 2J1 · Canada
Unsubscribe from newsletter