motor-admin 0.2.34 → 0.2.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a09f4465600321287f475933421d4c934b71d6a89b80b7f55ecccf4c870b0e99
4
- data.tar.gz: cae776e357211ff536cf8f23e2bae358ba331d47aa72d5c9293e43007af1daf1
3
+ metadata.gz: 1a7e4ffe16cfe1afe744f8a5c54f39858516b40d7389a0d074e7c19705181bbe
4
+ data.tar.gz: 4a7b8d35fc0e1f983d4420dd995d886204ada78404fa16874907c734a3d52976
5
5
  SHA512:
6
- metadata.gz: a7428045f23207b96d6bdce0bac377dbcd732e7e2fbe312f9428676d7242aa1553e602f20df19edbca050d0c7d25c04850d5ba8285ca0f98dd34da99739bc4ce
7
- data.tar.gz: 9b2f0168ff6d400ef8d227d77251d45eff0d73e11c19864beb141cfc40ff03fa760014fa142ae4062b5e63466c021d8a06c85b4d589022e4d35a0853d9f34eaa
6
+ metadata.gz: 97583ffa5b4ea71e4ebc1802de3dbc2ce24ba4ad0fdfb8d746dcf70e619ecd005b1ac56472b5b86d01a5e75a34bf4aeb5d2ced7c8519f1d0f378f88602e70cd8
7
+ data.tar.gz: a4ff78ad190f975ed4635bea15dcd88f413f8e4daf8637f4fe4494818ac59a9db453c7b41443d6b81071d8573976aed90bf5037a2600385630bec569263452b1
@@ -18,5 +18,16 @@ if Rails::VERSION::MAJOR == 7
18
18
  end
19
19
  end
20
20
  end
21
+
22
+ module Contexts
23
+ class BaseContext
24
+ def preload_records(association_name, records)
25
+ TemporaryPreloadConfig.within_context do
26
+ ActiveRecord::Associations::Preloader.new(records: records,
27
+ associations: association_name).call
28
+ end
29
+ end
30
+ end
31
+ end
21
32
  end
22
33
  end
data/lib/motor/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motor
4
- VERSION = '0.2.34'
4
+ VERSION = '0.2.35'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motor-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.34
4
+ version: 0.2.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-09 00:00:00.000000000 Z
11
+ date: 2021-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter