effective_mergery 1.0.0 → 1.0.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: d8a7243e93f05391396a3da6a84e7d1716df8cb7e8654ebb3256580305d8b58a
4
- data.tar.gz: 2a18ad03f692f3a6d114a1ae098f2f09d981f03c4aecf338c7cc90504ecb454a
3
+ metadata.gz: 0ea33c77fb67578c26c45b361a61c1919f274c48905ca282e5f7008fa77311a6
4
+ data.tar.gz: 3e8adef195a73c299ed88429a806920c192cce7abac8483a9ff673d9cbf88147
5
5
  SHA512:
6
- metadata.gz: dfd33e2d4c7d72786842be57e0ff29dd516ac08f390f0f2b85f845adb81494edccf6a593d15af8459d167f74433776e7c3fe6d9cee6a75b88f04e1880d055791
7
- data.tar.gz: d5f1a5868dc219bcc2980ecafa86416cf03949450a4614363fdb917b725a922452afdd17924f58f6ca7f1abdfc3f8acc8301fcf5aaba4554dada6d479066f3e1
6
+ metadata.gz: 68194271add0ff9b6d74a74c23ce11043174ad52b426c37808d4ebfca8f77293fc34827320425c9ba3efb522e91e9e9098148044fc49f3cb513b4e80820d3c60
7
+ data.tar.gz: b7cb98fcab88bcd8ab0d8b00c624a43357d3c87dd6a8bd59b96154cfe5fd6eac43e4b94f7364796bfba062530616eb2357f01937617c9048eb499409a6c41954
@@ -1,5 +1,5 @@
1
1
  - effective_resource = Effective::Resource.new(resource)
2
- - associations = (effective_resource.has_ones + effective_resource.has_manys).reject { |association| association.options[:through].present? }
2
+ - associations = (effective_resource.has_ones + effective_resource.has_manys + effective_resource.nested_resources).reject { |association| association.options[:through].present? }
3
3
  - limit = 10
4
4
 
5
5
  %table.table.table-sm.table-striped.mt-4
@@ -17,7 +17,12 @@
17
17
  %td
18
18
  - records.each do |record|
19
19
  - path = (admin_resource&.action_path(:edit, record) || admin_resource&.action_path(:show, record))
20
- %div= path.present? ? link_to(record.to_s, path) : record.to_s
20
+ %div
21
+ = path.present? ? link_to(record.to_s, path) : record.to_s
22
+ - if record.class.try(:acts_as_statused?)
23
+ = badge(record.status)
24
+ - if record.class.try(:acts_as_role_restricted?)
25
+ = roles_badges(record)
21
26
 
22
27
  - if total > records.size
23
28
  %small.text-muted= "and #{total - records.size} more…"
@@ -4,13 +4,13 @@
4
4
  - ajax_url = (effective_resources.users_effective_ajax_index_path unless Rails.env.test?)
5
5
 
6
6
  .row
7
- .col
7
+ .col-6
8
8
  = f.hidden_field :source_type, value: klass.name
9
9
  = f.select :source_id, klass.all, ajax_url: ajax_url, hint: 'This record will be destroyed',
10
10
  'data-load-ajax-url': effective_mergery.new_admin_merge_path,
11
11
  'data-load-ajax-div': '#effective-mergery-ajax',
12
12
  'data-load-ajax-all': true
13
- .col
13
+ .col-6
14
14
  = f.hidden_field :target_type, value: klass.name
15
15
  = f.select :target_id, klass.all, ajax_url: ajax_url, hint: 'This record will be kept',
16
16
  'data-load-ajax-url': effective_mergery.new_admin_merge_path,
@@ -1,3 +1,3 @@
1
1
  module EffectiveMergery
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_mergery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-05 00:00:00.000000000 Z
11
+ date: 2026-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails