eventsimple 1.7.0 → 1.7.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 953514829adab38f167e1d3e64ca57121c701b868f18474924ce1252797d3670
|
4
|
+
data.tar.gz: 02eebc6041d3404c885be084e01f3c1106687c677f9bc3de01853736c4f57590
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21bc4fe5dd6730a6b08fe397be3e1371c3b6aec61318bdd5ea1fa617889172f8b417d5b3aef1459e0d496ef3db416cb564622319dc6a585f557052043d5f68e5
|
7
|
+
data.tar.gz: f5acaa45ac8d2ac9e0e10cd9e97e3c686c3cb05a3d3e198b24283848438ae65114503ff081566c7cd150d697c895ca77da4825cee558a8b27704a2ead8b86fbd
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## Unreleased
|
8
8
|
|
9
|
+
## 1.7.1 - 2025-08-22
|
10
|
+
### Changed
|
11
|
+
- Use `model.unscoped` in Eventsimple UI to show soft-deleted records
|
12
|
+
|
9
13
|
## 1.7.0 - 2025-06-27
|
10
14
|
### Changed
|
11
15
|
- Verify optimistic locking column exists
|
data/Gemfile.lock
CHANGED
@@ -14,7 +14,7 @@ module Eventsimple
|
|
14
14
|
@filters = filter_columns.index_with { |column| params_filters[column] }
|
15
15
|
|
16
16
|
primary_key = @model_class.event_class._aggregate_id
|
17
|
-
@entity = @model_class.find_by!(primary_key => @aggregate_id)
|
17
|
+
@entity = @model_class.unscoped.find_by!(primary_key => @aggregate_id)
|
18
18
|
@entity_event_history = @entity.events.reverse
|
19
19
|
|
20
20
|
@selected_event = @entity_event_history.find { |e|
|
@@ -6,9 +6,10 @@ module Eventsimple
|
|
6
6
|
@model_name = params[:name]
|
7
7
|
model_class = event_classes.find { |d| d.name == @model_name }
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
model_class.unscoped do
|
10
|
+
scope = apply_filter(model_class, model_class.event_class)
|
11
|
+
@latest_entities = scope.last(20).reverse
|
12
|
+
end
|
12
13
|
|
13
14
|
check_redirect_to_entity
|
14
15
|
end
|
@@ -21,17 +22,16 @@ module Eventsimple
|
|
21
22
|
params_filters = params.permit(filters: {})[:filters] || {}
|
22
23
|
@filters = filter_columns.index_with { |column| params_filters[column] }
|
23
24
|
|
24
|
-
return model_event_class unless @filters.any?
|
25
|
+
return model_event_class unless @filters.values.any?(&:present?)
|
25
26
|
|
26
|
-
|
27
|
-
model_event_class = model_event_class.joins(
|
27
|
+
model_class_symbol = model_class.model_name.element.to_sym
|
28
|
+
model_event_class = model_event_class.joins(model_class_symbol)
|
28
29
|
@filters.each do |key, value|
|
29
30
|
next if value.blank?
|
30
31
|
|
31
32
|
key = model_event_class._aggregate_id if key == :aggregate_id
|
32
|
-
model_event_class = model_event_class.where({
|
33
|
+
model_event_class = model_event_class.where({ model_class_symbol => { key => value } })
|
33
34
|
end
|
34
|
-
|
35
35
|
model_event_class
|
36
36
|
end
|
37
37
|
|
data/lib/eventsimple/event.rb
CHANGED
data/lib/eventsimple/version.rb
CHANGED