esse-active_record 0.3.7 → 0.3.8
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/ci/Gemfile.rails-5.2.lock +1 -1
- data/ci/Gemfile.rails-6.0.lock +1 -1
- data/ci/Gemfile.rails-6.1.lock +1 -1
- data/ci/Gemfile.rails-7.0.lock +1 -1
- data/ci/Gemfile.rails-7.1.lock +1 -1
- data/lib/esse/active_record/callbacks/update_lazy_attribute.rb +2 -2
- data/lib/esse/active_record/version.rb +1 -1
- data/lib/esse/plugins/active_record.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9baa0f1dad618ca3520ad5cfefe4fb22d42e1411c56b7ff168e4503a1d720e75
|
|
4
|
+
data.tar.gz: 2d7c3aa59292b675600b556ddb07537bde6f5d833fc54c0e582f2886fc9f9ecc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a61ef5cd41fc8a4f2b86819f101c47a88544f7b446467ab1a5fed06e77809684cc04a784ad4699fc36ab3feb4553c0879d0237954db423cfe1b3ac0067647fa0
|
|
7
|
+
data.tar.gz: 4984a7e20c4fd4d359682864d24b543a6e12759e463cbee048f658b3abdf3a27e8d5a8ae434ddd28820f45e699c05c4138de33e86bbae9c2683954005601a4ce
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## 0.3.8 - 2024-08-08
|
|
8
|
+
* Add `connect_with:` option to the collection definition.
|
|
9
|
+
* Adjust UpdateLazyAttribute callback to not use keyword arguments for better compatibility with older versions of Ruby.
|
|
10
|
+
|
|
7
11
|
## 0.3.7 - 2024-08-05
|
|
8
12
|
* Add `connected_to` to the collection for custom connection handling
|
|
9
13
|
|
data/Gemfile.lock
CHANGED
data/ci/Gemfile.rails-5.2.lock
CHANGED
data/ci/Gemfile.rails-6.0.lock
CHANGED
data/ci/Gemfile.rails-6.1.lock
CHANGED
data/ci/Gemfile.rails-7.0.lock
CHANGED
data/ci/Gemfile.rails-7.1.lock
CHANGED
|
@@ -11,10 +11,10 @@ module Esse::ActiveRecord
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def call(model)
|
|
14
|
-
related_ids =
|
|
14
|
+
related_ids = Esse::ArrayUtils.wrap(block_result || model.id)
|
|
15
15
|
return true if related_ids.empty?
|
|
16
16
|
|
|
17
|
-
repo.update_documents_attribute(attribute_name,
|
|
17
|
+
repo.update_documents_attribute(attribute_name, related_ids, options)
|
|
18
18
|
|
|
19
19
|
true
|
|
20
20
|
end
|
|
@@ -18,6 +18,7 @@ module Esse
|
|
|
18
18
|
repo = Class.new(Esse::ActiveRecord::Collection)
|
|
19
19
|
repo.base_scope = -> { model_class }
|
|
20
20
|
repo.batch_size = kwargs.delete(:batch_size) if kwargs.key?(:batch_size)
|
|
21
|
+
repo.connect_with = kwargs.delete(:connect_with) if kwargs.key?(:connect_with)
|
|
21
22
|
repo.class_eval(&block) if block
|
|
22
23
|
|
|
23
24
|
super(repo, *args, **kwargs)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: esse-active_record
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marcos G. Zimmermann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-08-
|
|
11
|
+
date: 2024-08-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: esse
|