March 1, 2024
Added fixture method and bugfixes
Hi, Wojtek from this side. Let’s explore this week’s few changes in the Rails codebase. Rails security update releases Rails Versions 6.1.7.7, 7.0.8.1, and 7.1.3.2 have been released last week which contain fixes for security issues. Expose a generic “fixture” method in tests To avoid conflicting methods, in example with Minitest, it i...
Read more
Read more
February 24, 2024
Enhanced assert_broadcasts, file support for Logger outputs and more!
Hope you're having a lovely weekend. Emmanuel here with yet another batch of Rails updates for you! assert_broadcasts returns the messages that were broadcast assert_broadcasts now not only confirms the broadcast but also provides access to the messages that were broadcast. This enhancement, similar to what we have in assert_emails, fa...
Read more
Read more
February 16, 2024
Rails World CFP, ActiveRecord::Base.with_connection, devcontainer and puma-dev support and more!
Hi! Vipul here with the latest updates for This Week in Rails! Rails World CFP Call for Papers is now open for The Rails World 2024 conference that will be held in Toronto, Canada this year. The CFP will remain open until 21st March. Head over here to submit your proposal! Generate devcontainer files by default This change generates a ...
Read more
Read more
February 9, 2024
Rails Foundation Docs, Query Logs source_location, Dockerfile gets jemalloc
Hi, it’s zzak. Let’s explore this week’s changes in the Rails codebase. Rails Foundation Docs A team has been formed to improve the existing Rails documentation. PRs from this project will stay open for one week for community review. Open this week: • ActiveJob.perform_all_later • Action Text • Action Mailbox More to come! Properly syn...
Read more
Read more
February 2, 2024
Deprecation, bugfixes and more!
Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase. Deprecate passing nil as model argument Passing model: nil as an argument to the form_with method will be deprecated in the next release of Rails. Skip CSS when creating APIs This pull request makes the Rails generator skip the CSS part if the --api flag is set, be...
Read more
Read more
January 26, 2024
Customized console prompt and bugfixes
Hi, Wojtek from this side with a short set of changes in the Rails codebase. Add customized prompt for Rails console Rails console now indicates the current Rails environment with the name and color (red for production). Fix rotation detection for HDR videos This fix removes the positional reference on side_data and explicitly searches...
Read more
Read more
January 19, 2024
A class method to introspect delegated types, schema_dump configuration via DATABASE_URL, etc
As the morning sun casts its gentle glow, I find myself aboard a train bound for Szklarska Poręba. I'm literally on Rails! I thought, what better setting to share the latest updates on Rails than while traversing these literal rails? Define a class method to introspect valid delegatable types This PR introduces a <role>_types class met...
Read more
Read more
January 12, 2024
Updated Puma configuration, Object#with_block, and more!
Hi! Vipul here with the second edition of This Week in Rails for 2024! This second week continues with a flurry of activity with more than 140+ changes making in. Lets dive into some of these changes! Update the default Puma configuration There was an extensive discussion in this issue about - setting a new default for the Puma thread ...
Read more
Read more
January 5, 2024
Omakase RuboCop, Brakeman, Ruby 3.1+, allow_browser, rate_limit, and more
Hi, zzak here with the first edition of This Week in Rails for 2024. This year started off with a ton of contributions, nearly 170 commits, sorry we couldn’t fit everything in a single newsletter. Rails UJS has been deprecated since Rails 7, time to die While the official package "@rails/ujs" is still published on NPM, and the final co...
Read more
Read more
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Read more
See more posts »