|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "Rails World CFP, ActiveRecord::Base.with_connection, devcontainer and puma-dev support and more!" |
| 4 | +categories: news |
| 5 | +author: vipulnsward |
| 6 | +og_image: assets/images/this-week-in-rails.png |
| 7 | +published: true |
| 8 | +date: 2024-02-16 |
| 9 | +--- |
| 10 | + |
| 11 | + |
| 12 | +Hi! [Vipul](https://www.saeloun.com/team/vipul) here with the latest updates for This Week in Rails! |
| 13 | + |
| 14 | +[Rails World CFP](https://rubyonrails.org/2024/2/5/rails-world-2024-cfp-is-open) |
| 15 | +Call for Papers is now open for The Rails World 2024 conference that will be held in Toronto, Canada this year. |
| 16 | +The CFP will remain open until 21st March. |
| 17 | +Head over [here](https://sessionize.com/rails-world/) to submit your proposal! |
| 18 | + |
| 19 | +[Generate devcontainer files by default](https://github.com/rails/rails/pull/50914) |
| 20 | +This change generates a `.devcontainer` folder and its contents when creating a new app. |
| 21 | +The `.devcontainer` folder includes everything needed to [boot the app and do development in a remote container](https://containers.dev/). |
| 22 | +These files can be skipped using the `--skip-devcontainer` option. |
| 23 | + |
| 24 | +[Use ruby file: ".ruby-version" in Gemfile for new apps](https://github.com/rails/rails/pull/49360) |
| 25 | +Previously, new apps would have a Ruby version set in both the Gemfile and the `.ruby-version` file. |
| 26 | +This duplication made it more difficult to quickly change an application's ruby version as users must remember to update multiple files. |
| 27 | +This change updates the app generator's Gemfile to read the Ruby version from the `.ruby-version` file. |
| 28 | + |
| 29 | +[Add `ActiveRecord::Base.with_connection` as a shortcut for leasing a connection for a short duration](https://github.com/rails/rails/pull/51083) |
| 30 | +This change adds `ActiveRecord::Base.with_connection` as a shortcut for leasing a connection for a short duration. |
| 31 | +The leased connection is yielded, and for the duration of the block, any call to `ActiveRecord::Base.connection` will yield that same connection. |
| 32 | +This is useful to perform a few database operations without causing a connection to be leased for the entire duration of the request or job. |
| 33 | + |
| 34 | +[Support encrypting binary columns](https://github.com/rails/rails/pull/50920) |
| 35 | +Previously encrypting binary columns with the `ActiveRecord::Encryption::MessageSerializer` incidentally worked for MySQL and SQLite, but not PostgreSQL. |
| 36 | +This change adds proper support now for encrypting binary columns types. |
| 37 | + |
| 38 | + |
| 39 | +[Suggest puma-dev configuration in bin/setup ](https://github.com/rails/rails/pull/51088) |
| 40 | +Rails now suggest [puma-dev](https://github.com/puma/puma-dev) as the golden path for developing multiple Rails applications locally, if you're not using Docker. |
| 41 | +`bin/setup` has now been updated to suggest how to get that setup. |
| 42 | + |
| 43 | +[Add .test to default allowed host in development mode](https://github.com/rails/rails/pull/51087) |
| 44 | +Continuing on support for [puma-dev](https://github.com/puma/puma-dev) this change adds ".test" as a default allowed host in development to ensure a smooth setup. |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +_You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2024-02-10%7D...main@%7B2024-02-16%7D)._ |
| 49 | +_We had [30 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20240110-20240116) to the Rails codebase this past week!_ |
| 50 | + |
| 51 | +Until next time! |
| 52 | + |
| 53 | +_[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you._ |
0 commit comments