1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Jean Boussier 8459c1c22f Make legacy_connection_handling a module instance variable
Ref: https://github.com/rails/rails/pull/42237
Ref: https://bugs.ruby-lang.org/issues/17763

Ruby class variables are slow, and get slower the more ancestors the class has.
And it doesn't seem likely to get faster any time soon. Overall I'm under the
impression that ruby-core consider them more or less deprecated.

But in many cases where `cattr_accessor` is used, a class instance variable
could work just fine, and would be much faster.

For Active Record this means most of the `cattr_accessor` on `ActiveRecord::Base`
could actually be `attr_accessor` on `ActiveRecord`.

I started with `legacy_connection_handling` as a proof of concept.
2021-06-10 15:00:20 +02:00
..
active_record/connection_adapters
activejob Updated abbreviation for single table inheritance. 2021-04-16 11:53:05 +05:30
assets
cases Make legacy_connection_handling a module instance variable 2021-06-10 15:00:20 +02:00
fixtures Remove fixed "id" in encrypted book fixtures 2021-04-13 08:55:44 -04:00
migrations
models Derive foreign key from model name in has_many associations 2021-05-12 15:21:31 -04:00
schema Add option to skip joins for associations. 2021-04-19 11:17:31 -04:00
support Make legacy_connection_handling a module instance variable 2021-06-10 15:00:20 +02:00
config.example.yml
config.rb