|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "Ignoring indexes in MySQL has never been so easy..." |
| 4 | +categories: news |
| 5 | +author: zzak |
| 6 | +og_image: assets/images/this-week-in-rails.png |
| 7 | +published: true |
| 8 | +date: 2025-02-28 |
| 9 | +--- |
| 10 | + |
| 11 | + |
| 12 | +Hey, [zzak](https://github.com/zzak) here. Last week was a short one, so we took the week off, let's catch up. |
| 13 | + |
| 14 | +Heads up: the **Rails World CFP** will open on **March 11th**. |
| 15 | +The 2025 landing page is currently being built, but if you are going to submit a talk, keep an eye on: [rubyonrails.org/world/](https://rubyonrails.org/world) |
| 16 | + |
| 17 | +[Add Podman instructions for devcontainers](https://github.com/rails/rails/pull/54572) |
| 18 | +This is not necessarily a change to Rails itself, but worth noting that you don't have to rely on Docker to use devcontainers and we actually use Podman to test the `rails new` flow in CI as well. |
| 19 | + |
| 20 | +[Add login_as(user) testing helper when generating authentication](https://github.com/rails/rails/pull/53708) |
| 21 | +When using the Authentication generator, you now get `sign_in_as(user)` and `sign_out` test helper methods. |
| 22 | + |
| 23 | +[Introduce "ActiveSupport::ErrorReport#add_middleware"](https://github.com/rails/rails/pull/54512) |
| 24 | +This PR introduces the concept of a middleware stack to the ErrorReporter. Middleware are used to add or mutate the context which the error being reported occurs, and can be added using [`add_middleware`](https://edgeapi.rubyonrails.org/classes/ActiveSupport/ErrorReporter.html#method-i-add_middleware). |
| 25 | + |
| 26 | +[Add "report" option to "ActiveJob::Base#retry_on" and "#discard_on"](https://github.com/rails/rails/pull/54541) |
| 27 | +When using Active Job you can now specify to report errors to [ErrorReporter](https://edgeapi.rubyonrails.org/classes/ActiveSupport/ErrorReporter.html) when retrying or discarding jobs occurs. |
| 28 | + |
| 29 | +[Support disabling indexes for MySQL v8+ and MariaDB v10.6+](https://github.com/rails/rails/pull/54332) |
| 30 | +This PR takes advantage of "invisible" or "ignored" indexes in newer versions of MySQL and MariaDB, which can be managed using migrations. |
| 31 | +See the [MySQL](https://dev.mysql.com/blog-archive/mysql-8-0-invisible-indexes/) or [MariaDB](https://mariadb.com/kb/en/ignored-indexes/) docs for more. |
| 32 | + |
| 33 | +[Add column types to "ActiveRecord::Result" for SQLite3](https://github.com/rails/rails/pull/54594) |
| 34 | +When using the SQLite3 adapter you can now get the column type information from a query using [column_types](https://edgeapi.rubyonrails.org/classes/ActiveRecord/Result.html#method-i-column_types). |
| 35 | + |
| 36 | +[Raise "ActiveRecord::ReadOnlyError" when pessimistically locking with a readonly role](https://github.com/rails/rails/pull/54580) |
| 37 | +This PR ensures that calling `lock!` when [`current_preventing_writes`](https://edgeapi.rubyonrails.org/classes/ActiveRecord/Core.html#method-c-current_preventing_writes) is enabled will raise an error to improve the usability in this scenario. |
| 38 | + |
| 39 | +[Ensure "reverse_order" respects "implicit_order_column"](https://github.com/rails/rails/pull/54607) |
| 40 | +This PR makes sure that `reverse_order` takes into account the model [`implicit_order_column`](https://edgeapi.rubyonrails.org/classes/ActiveRecord/ModelSchema.html#method-c-implicit_order_column) when reversing the order. |
| 41 | + |
| 42 | +[Add SafeBuffer to the list of messagepack serializable type](https://github.com/rails/rails/pull/54584) |
| 43 | +When using MessagePack to serialize cookies, this PR fixes an issue when trying to persist SafeBuffer type objects in a cookie. |
| 44 | + |
| 45 | +[Fix "LocalStore#read_multi_entries" to distinguish recorded misses](https://github.com/rails/rails/pull/54586) |
| 46 | +This PR addresses a bug when using LocalStore cache where a read or exists? check for a key would inadvertently result in consecutive `fetch_multi` calls return `nil` for the value. |
| 47 | + |
| 48 | +[Add Timezone America/Asuncion](https://github.com/rails/rails/pull/54571) |
| 49 | +They stopped observing DST last year, and a new IANA timezone was added. |
| 50 | + |
| 51 | +[Add "prepend" method to "MessageEncryptors" and "MessageVerifiers"](https://github.com/rails/rails/pull/54525) |
| 52 | +This adds a _#prepend_ method to [_ActiveSupport::MessageEncryptors_](https://edgeapi.rubyonrails.org/classes/ActiveSupport/MessageEncryptors.html) and [_ActiveSupport::MessageVerifiers_](https://edgeapi.rubyonrails.org/classes/ActiveSupport/MessageVerifiers.html). |
| 53 | +This method behaves like _#rotate_, but it prepends to the list instead of appends. Thus it can be used to override the way messages are generated for preconfigured instances such as _Rails.application.message_verifiers_. |
| 54 | + |
| 55 | + |
| 56 | +_You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2025-02-13%7D...main@%7B2025-02-28%7D)._ |
| 57 | +_We had [34 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20250213-20250228) to the Rails codebase this past week!_ |
| 58 | + |
| 59 | +Until next time! |
| 60 | + |
| 61 | +_[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you._ |
0 commit comments