This Week in Rails

Your weekly inside scoop of interesting commits, pull requests and more from Rails.
December 29, 2023

This year in Rails, a summary of 2023

This is Emmanuel, Greg, Vipul, Wojciech, and Zzak, bringing you the summary of what happened with Rails in the past year. It was a busy year with over 4300 commits from 520 contributors and 23 releases, including Rails 7.1! For this year end issue, as a team we each hand-picked some of our favorite pull requests from the last year. Ref...
Read more
December 22, 2023

This Week in Rails: bug report template changes, new test helpers and more!

Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase. Rails World 2024 updates The venue, the sponsorship options, information about the CFP and the ticket costs were announced this week. Fix inclusion of url_helpers module in concern The dynamically generated url_helpers module is an ActiveSupport::Concern. Therefore...
Read more
December 15, 2023

Exposed queries assertion methods and more

Hi, it’s Wojtek with latest changes in the Rails codebase. Expose queries test assertion methods To assert the expected number of queries are made, Rails internally uses assert_queries and assert_no_queries. These assertions can now be used in applications as well. Allow serving compressed SVG images This adds image/svg+xml to the comp...
Read more
December 8, 2023

Allow object_id as a column name for Active Record and a lot more!

Take Active Record affixes into account for Active Storage database models This pull request ensures that all Active Storage database-related models adhere to the ActiveRecord::Base.table_name_prefix configuration. Make isolated engines aware of Active Record::Base table name prefix Address isolated engines to incorporate the ActiveRec...
Read more
November 24, 2023

ErrorReporter#unexpected, with_routing test helpers and more!

Happy Thanksgiving weekend everyone! This is Vipul bringing you the latest from this week’s changes in the Rails codebase. ErrorReporter#unexpected to report in production but raise in development This change adds ErrorReported#unexpected to report precondition violations. For example: def edit if published? Rails.error.unexpected("[BU...
Read more
November 17, 2023

Action Mailer bug report template, Active Storage fixes and more!

Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase. Fix word_wrap with empty string This pull request fixes word_wrap to return an empty string instead of nil when given an empty string. Process preview variant when processing preview This pull request updates ActiveStorage::Preview#processed to generate both the fu...
Read more
November 10, 2023

YJIT enabled by default, Active Model improvements and much more

Hi, it’s Wojtek. This week, the documentary movie about the origins of Ruby on Rails premiered. You can see it on the Honeypot YouTube channel. Now, let’s explore this week’s changes in the Rails codebase. Enable YJIT by default if running Ruby 3.3+ There was many public reports of 15-25% latency improvements for Rails apps that did en...
Read more
November 3, 2023

"INSERT...RETURNING" for MariaDB, "SET CONSTRAINTS" for PostgreSQL, "DEFERRABLE" foreign keys for SQLite and much more!

Hey, zzak here with the first edition of This Week in Rails for November, 2023. Support RETURNING clause for MariaDB This PR adds support for the INSERT ... RETURNING expression for the MariaDB adapter. You can read more about this feature in the official MariaDB docs. Simplify attr_internal_define This PR optimizes the internals of Mo...
Read more
October 28, 2023

Reduce memory used by ActiveSupport::Callbacks, non-column-backed attributes for enum and more!

Hi! This is Vipul bringing you the latest from this week’s changes in the Rails codebase. Reduce memory used by ActiveSupport::Callbacks Previously, callbacks which were shared with subclasses would not share between them the procs generated in before/after filters. This was also lazily generated so would cause memory growth after an a...
Read more
October 20, 2023

Rails World talks online, fix of a 13 years old bug and more!

Hi, it’s Greg, bringing you this week’s changes in the Rails codebase. Rails World talks are online The talks from Rails World 2023 are now available to watch online! You can watch all of them on the YouTube playlist. Also, Amanda Perino wrote a recap of Rails World. Do not memoize auto/eager load paths in engines This pull request fix...
Read more
October 13, 2023

Special Rails World Edition: Rails 7.1.1, Solid Queue, Solid Cache, Turbo 8, etc.

Rails World concluded last week, and calling it a success would be an understatement. With 29 exceptional speakers and a diverse audience of over 700 attendees representing various corners of the globe, Rails Foundation, under the leadership of Executive Director Amanda Perino, executed an inaugural Rails conference that exuded the mat...
Read more
September 29, 2023

This Week in Rails - September 29

Hi, Wojtek here. The Rails World starts next week. Three members of the current This Week In Rails editorial team — Greg, Emmanuel, and myself — will be in attendance. We’ve got some stickers featuring the newsletter’s logo, so be sure to spot us to snag one! Now, let’s delve into the latest updates in the Rails codebase. Rails 7.1.0.r...
Read more
September 22, 2023

SQLite3 adapter now handles default functions with concatenation and supports `supports_insert_returning?`

Default retry strategy uses polynomial backoff instead of exponential backoff This modifies the wait option's name to provide a more explicit indication that jobs will undergo retry attempts using polynomial backoff. It also ensures that the previous, legacy name remains functional to maintain backward compatibility. SQLite3 adapter ha...
Read more
September 15, 2023

This Week in Rails: 7.1 beta release, Bun support and more!

Hi, it’s Greg, bringing you the latest changes in the Rails codebase. Rails 7.1 beta release The first beta version of Rails 7.1 has been released! There have been over five thousand commits made by over 800 contributors since Rails 7.0, so this release is packed with new features and improvements. You can read a summary of the changes...
Read more
September 9, 2023

Infer primary_key: :id on associations with composite primary key models, add validation option for enum and more!

Hi! This is Vipul bringing you the latest from this week’s changes in the Rails codebase. Infer primary_key: :id on associations with composite primary key models Prior to this change, you’d need to do the following to set up associations for composite primary key models: class Order self.primary_key = [:shop_id, :id] has_many :order_a...
Read more
August 25, 2023

This Week in Rails - August 25

Hi, Wojtek here. Let’s explore last 2 week’s changes in the Rails codebase. Rails Versions 7.0.7.2, 6.1.7.6 have been released Just after the previous security releases 7.0.7.1, 6.1.7.5 but with fixed file permissions. MRSK renamed to Kamal Due to a trademark claim, the project was renamed to Kamal. Add after_discard method to Active J...
Read more
August 11, 2023

A new release, Action Mailer preview empty states, bugfixes and more!

Hi, it’s Greg, bringing you the latest changes in the Rails codebase. Introducing the Rails Luminary Awards: Nominations Now Open Starting at Rails World in October, the Rails Foundation will establish a new tradition of celebrating Rails Luminaries- people who’ve contributed to the Rails ecosystem and community with exceptional code, ...
Read more
August 4, 2023

Omit webdrivers gem from new apps Gemfile, support for filtering tests by line range and more!

Hi! This is Vipul bringing you the latest from this week's changes in the Rails codebase. Introduce config.dom_testing_default_html_version and use Rails::Dom::Testing to parse HTML in test helpers Previously support was added to Rails::Dom::Testing for HTML5. This may cause issues if we still want to rely on HTML4 based testing. This ...
Read more
July 28, 2023

This Week in Rails - July 28, 2023

Hi, it’s zzak. Let’s explore this week’s changes in the Rails codebase. Rack::Lint on Rails middleware tests While this work is not technically user-facing, it’s important to ensure the future of Rails continues to maintain compatibility with the Rack SPEC. You can read more about the Rack 3 upgrade guide if you’re interested or mainta...
Read more
July 21, 2023

A much needed Active Storage documentation with a new option to trigger has_secure_token

This is Emmanuel... you haven't heard from me in a while. I'm doing great, and have a few merged pull requests that I want to share with you. Don't show secrets for MessageVerifier#inspect and KeyGenerator#inspect If anyone calls a cipher in the console, it will reveal the secret of the encryptor. By overriding the inspect method to di...
Read more
July 7, 2023

Preprocessed Active Storage variants and more

Hi, Wojtek here. Let’s see what changed in the Rails codebase. Add an option to preprocess Active Storage variants in background job Active Storage variants are processed on the fly when they are needed but sometimes we’re sure that they are accessed and want to process them upfront. class User < ApplicationRecord has_one_attached :ava...
Read more
June 30, 2023

A CVE, two new Rails releases in a week, config.autoload_lib, and more!

Happy Friday Everyone! This is Vipul, bringing you the latest changes in the Rails codebase. [CVE-2023-28362] Possible XSS via User Supplied Values to redirect_to If you haven't already, its time to upgrade your Rails application to the latest version! Rails versions 7.0.5.1, 6.1.7.4 have been released with a security fix for a possibl...
Read more
June 23, 2023

Rails World website and ticket sales, CPK improvements and more!

Hi, it’s Greg, bringing you the latest changes in the Rails codebase. Rails World’s site is live! The Rails World conference website is live from today. It was created by Shona Chan, a junior developer from the Rails community. It was commissioned by the Rails Foundation, designed by Katya Sitko and created under the mentorship of Ayus...
Read more
June 16, 2023

SSL Enforcement, new Postgres enum features, and changes to Rails.application.secrets

Hi, it’s zzak. We’re officially half-way through June, and we’ve got a shorter edition this week but let’s hop in. Enable `force_ssl=true` in production by default This PR affects newly generated apps to make SSL enforcement the default behavior in production mode, ensuring all access to the application occurs over SSL, with Strict-Tra...
Read more
June 9, 2023

This Week In Rails - June 9, 2023

Hi! Emmanuel here writing from a train to Katowice! There have been quite a few developments in the Rails codebase over the last few weeks! Let's take a look at some of them, shall we? Create a class level #with_routing helper The with_routing helper can now be called at the class level. When called at this level, the routes will be se...
Read more
June 2, 2023

HTML5 sanitizer, path_params and more

Hi, Wojtek here. Let’s explore this week’s changes in the Rails codebase. Update Action View to use HTML5 standards-compliant sanitizers Add support for HTML5 standards-compliant sanitizers, and default to Rails::HTML5::Sanitizer in the Rails 7.1 configuration if it is supported. Action View’s HTML sanitizers can be configured by setti...
Read more
May 26, 2023

This Week In Rails - May 26, 2023

Hey! zzak here with another edition of This Week in Rails. Reminder: The Rails World CFP is open until June 16. Whether you’re a seasoned veteran or a newcomer to the Rails ecosystem, we encourage you to submit proposals that showcase forward-thinking ideas and push the boundaries of what’s possible with Rails. Rails 7.0.5 has been rel...
Read more
May 19, 2023

Rails World CFP, ActiveRecord.disconnect_all!, optimized where query and more!

Hello Everyone! This is Vipul, bringing you this week’s changes in the Rails codebase. Rails World Call for Papers now open This CFP is open until June 16, with space in the agenda for 26 talks on two tracks, and up to six workshops. Read the full announcement for more details and submit your proposal! Introduce ActiveRecord.disconnect...
Read more
May 12, 2023

Rails World CFP, picture_tag helper and more!

Hi, this is Greg, bringing you this week’s changes in the Rails codebase. Rails World Call for Papers now open This CFP is open until June 16, with space in the agenda for 26 talks on two tracks, and up to six workshops. Read the full announcement for more details and submit your proposal! Prevent duplicate filters for encrypted attrib...
Read more
May 5, 2023

This Week in Rails: Rails World tickets waiting list, caching improvements and more!

Hi, it’s Greg, bringing you this week’s changes in the Rails codebase. Rails World tickets waiting list Many of you asked if there is a waiting list where you can be informed when Rails World tickets go on sale, and the Rails Foundation listened. Sign up here to be alerted when we release Early Bird tickets: https://ti.to/rails-world/r...
Read more

See more posts »