This Week in Rails

December 9, 2022

Disabled IRB autocompletion, bugfixes and more!

Hi, this is Greg, bringing you the latest news about Rails.

Replace method_source gem with Ripper
With this change, Ripper is used to determine the last line number of a given test method to support running tests by line number.

Disable Rails console IRB's autocompletion in production by default
Autocompletion increases data transmission significantly, which can cause a noticeable slowdown when connecting to remote servers, and it also has many issues to be resolved, so it is disabled by default now. It can be still enabled if needed by setting the IRB_USE_AUTOCOMPLETE environmental variable to true.

This pull request makes the stream object a closer analog of an IO. Some code, like Ruby's built-in CSV, will always try to use #<< when writing.

Fix ActiveRecord::Calculations#ids returns duplicate ids
This pull request changes ActiveRecord::Calculations#ids to only return the unique ids of the base model, ignoring the join on eager loaded, preloaded and included associations.

Support has_rich_text with strict_loading
This pull request expands the has_rich_text signature to accept a strict_loading: value that it forwards along to the has_one declaration made under the hood. When omitted, strict_loading: will be set to the value of the strict_loading_by_default class attribute, which is false by default.

16 people contributed to Rails this past week. Until next week!

About This Week in Rails

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