pg_rails 7.6.18 → 7.6.20
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/pg_engine/app/controllers/concerns/pg_engine/resource.rb +1 -1
- data/pg_engine/app/views/pg_engine/base/index.html.slim +1 -1
- data/pg_engine/lib/pg_engine/utils/{check_invalid_records.rb → resource_reports.rb} +22 -3
- data/pg_layout/app/views/layouts/pg_layout/base.html.slim +2 -1
- data/pg_layout/app/views/layouts/pg_layout/show.html.slim +2 -2
- data/pg_rails/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a76ffabfe4b54636335deff5bc216c0de26d6f0a6a7e42a5b54c6d3e1c065a7
|
4
|
+
data.tar.gz: 72bd49ecd3d237d6aa083d54ec04f2d473a1c427e1c971b0ae77e65da94a4044
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3199b9c236fc31a94710715e1c64f6a40d90c0c3b391a3e7c73dc79723bdab3ecf4a55adba024002efbf5a95d3990aa0569c6ef08f4acfc55bc88a9f2bfc862f
|
7
|
+
data.tar.gz: f4037520fd19acdf4e0c2b1564519431d35c5c6dd65dca12ee7b78bb97b83dd2b787077295e951cc28f4767dd3f71bede2b5fa52716b919c94256df9a0616245
|
@@ -474,7 +474,7 @@ module PgEngine
|
|
474
474
|
current_page = (total.to_f / current_page_size).ceil
|
475
475
|
end
|
476
476
|
@collection = @collection.page(current_page).per(current_page_size)
|
477
|
-
@records_filtered = default_scope_for_current_model(archived:).any? if @collection.empty?
|
477
|
+
@records_filtered = default_scope_for_current_model(archived:).any? if @filtros.present? && @collection.empty?
|
478
478
|
render :index
|
479
479
|
end
|
480
480
|
|
@@ -53,12 +53,12 @@
|
|
53
53
|
tr id="#{dom_id(object)}"
|
54
54
|
td.text-nowrap.xtext-end.xps-5
|
55
55
|
.actions-wrapper
|
56
|
-
= object.extra_actions(size: :sm) if object.respond_to? :extra_actions
|
57
56
|
= object.show_link(text: '')
|
58
57
|
= object.edit_link(text: '', klass: 'btn-light')
|
59
58
|
= object.archive_link
|
60
59
|
= object.restore_link
|
61
60
|
= object.destroy_link
|
61
|
+
= object.extra_actions(size: :sm) if object.respond_to? :extra_actions
|
62
62
|
- atributos_para_listar.each do |att, _sort_field|
|
63
63
|
= column_for object, att
|
64
64
|
- if action_name == 'archived'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# :nocov:
|
2
2
|
module PgEngine
|
3
3
|
module Utils
|
4
|
-
class
|
5
|
-
def
|
4
|
+
class ResourceReports
|
5
|
+
def check_invalid_records
|
6
6
|
invalids = []
|
7
7
|
classes.each do |klass|
|
8
8
|
klass.find_each do |record|
|
@@ -19,6 +19,26 @@ module PgEngine
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
def report(klass)
|
23
|
+
if klass.respond_to?(:discarded)
|
24
|
+
<<~STRING
|
25
|
+
#{klass}.unscoped.count: #{klass.unscoped.count}
|
26
|
+
#{klass}.unscoped.kept.count: #{klass.unscoped.kept.count}
|
27
|
+
#{klass}.unscoped.unkept.count: #{klass.unscoped.unkept.count}
|
28
|
+
#{klass}.unscoped.discarded.count: #{klass.unscoped.discarded.count}
|
29
|
+
#{klass}.unscoped.undiscarded.count: #{klass.unscoped.undiscarded.count}
|
30
|
+
STRING
|
31
|
+
else
|
32
|
+
<<~STRING
|
33
|
+
#{klass}.unscoped.count: #{klass.unscoped.count}
|
34
|
+
STRING
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def report_all
|
39
|
+
classes.map { |klass| report(klass).to_s }.join("\n")
|
40
|
+
end
|
41
|
+
|
22
42
|
def classes
|
23
43
|
all = ActiveRecord::Base.descendants.select { |m| m.table_name.present? }
|
24
44
|
all - ignored_classes
|
@@ -28,7 +48,6 @@ module PgEngine
|
|
28
48
|
[
|
29
49
|
ActionText::Record,
|
30
50
|
ActionMailbox::Record,
|
31
|
-
ActiveAdmin::Comment,
|
32
51
|
ActiveStorage::Record,
|
33
52
|
PgEngine::BaseRecord,
|
34
53
|
Audited::Audit,
|
@@ -23,7 +23,8 @@ html
|
|
23
23
|
/ En general es deseable el comportamiento scroll "reset", por ejemplo en los forms,
|
24
24
|
/ ya que los errores se muestran arriba y el botón de submit está abajo
|
25
25
|
/ meta name="turbo-refresh-scroll" content="preserve"
|
26
|
-
|
26
|
+
|
27
|
+
meta name="turbo-prefetch" content="#{ENV.fetch('TURBO_PREFETCH_ENABLE', 'false')}"
|
27
28
|
meta name="view-transition" content="same-origin"
|
28
29
|
meta name="cable-history-timestamp" content="#{Time.now.to_i}"
|
29
30
|
= csrf_meta_tags
|
data/pg_rails/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.6.
|
4
|
+
version: 7.6.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -847,9 +847,9 @@ files:
|
|
847
847
|
- pg_engine/lib/pg_engine/mailgun/log_sync.rb
|
848
848
|
- pg_engine/lib/pg_engine/navigator.rb
|
849
849
|
- pg_engine/lib/pg_engine/route_helpers.rb
|
850
|
-
- pg_engine/lib/pg_engine/utils/check_invalid_records.rb
|
851
850
|
- pg_engine/lib/pg_engine/utils/pdf_preview_generator.rb
|
852
851
|
- pg_engine/lib/pg_engine/utils/pg_logger.rb
|
852
|
+
- pg_engine/lib/pg_engine/utils/resource_reports.rb
|
853
853
|
- pg_engine/lib/tasks/auto_anotar_modelos.rake
|
854
854
|
- pg_engine/spec/components/alert_component_spec.rb
|
855
855
|
- pg_engine/spec/components/internal_error_component_spec.rb
|