rails--rails/activerecord/test
Ulysse Buonomo 546de0f6c6 Avoid eager loading in Relation#pretty_print
We mimic the behaviour used with `#inspect`, only fetching up to 11
elements if records are not loaded already.

Here's the reproduction:

```
require "activerecord"

ActiveRecord::Base.establish_connection YOUR_DB_URL_THERE

ActiveRecord::Migration.new.tap do |m|
  m.create_table :foos do |t|
    t.text :name
  end
end

class Foo < ActiveRecord::Base
end

100.times { Foo.create(name: "foo#{_1}") }

pp Foo.all # loads the whole table.
```

Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>
2022-01-07 17:29:17 +01:00
..
active_record/connection_adapters
activejob Revert "Run ActiveRecord -> ActiveJob integration tests in CI" 2021-06-15 11:19:04 -04:00
assets
cases Avoid eager loading in Relation#pretty_print 2022-01-07 17:29:17 +01:00
fixtures Properly quote autogenerated column aliases 2021-12-17 12:29:11 +01:00
migrations Sort migration ID as int in db:migrate:status for consistency. 2021-07-16 13:10:31 -05:00
models Merge PR #43389 2021-12-20 22:47:24 +00:00
schema Extract `on update CURRENT_TIMESTAMP` for mysql2 adapter 2022-01-01 21:37:15 +09:00
support Rename `adapter_short` to `adapter_name` 2021-09-21 08:26:04 +09:00
config.example.yml add warning to mysql2 default prepared_statements 2021-12-21 06:36:01 +00:00
config.rb Delete AS::Dependencies.safe_constantize 2021-08-20 17:51:05 +02:00