motor-admin 0.4.29 → 0.4.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0f1b82c0d0c82435cff85fca06a7bd5237f4866c6485f7660473848498a9721
4
- data.tar.gz: 3641b27f778d85d4675ef9321b1e089463c7326ef4b723dad627fde31c3a1a6d
3
+ metadata.gz: 744cbb9dcbd0e7cb01bec5fb771e50e52db58cc0adb9634ea80bd5dd02ffc2f3
4
+ data.tar.gz: 38ddbed12cb036e8ff51e84615541c71fa62d795633ea84044bff0e71817d9c9
5
5
  SHA512:
6
- metadata.gz: 87c72e5416a8a70532c0a6190e1e45961f205fb03d694102e7ecad69f518afcb971341bb45dadada031d7090083200498c91b16d29320f4f3e03a0dfc695ad53
7
- data.tar.gz: 7ec83646e03cc9bfe5ebe0a8d19d429a6b1a371165beaa60cbcba10505c6e7ce6ce43f6137c01e8aaca82ceb58aee95aadb9e5ffb3a44791b9abe618a9a02fb0
6
+ metadata.gz: f32d7ed6a65d87dc067ae3e8458918826789419d17b1cc206dca49da8c53462e0e6d0346ec5f17b6d83ddaceb289f1a4f70ee44d06d2d19938681dc1fb95d6a9
7
+ data.tar.gz: bac8cf16d33d9f3ef297757e46fc13eb89c73d117b1170c868cd9ed334bf8ecd7c7b5539e729b3647136ce44be1864a0bf35f6c03706dee2a4ca89973b2500ba
@@ -4,6 +4,10 @@ module Motor
4
4
  class Audit < Audited::Audit
5
5
  self.table_name = 'motor_audits'
6
6
 
7
+ if Rails.version.to_f >= 7.2
8
+ superclass.abstract_class = true
9
+ end
10
+
7
11
  if Rails.version.to_f >= 7.1
8
12
  serialize :audited_changes, coder: HashSerializer
9
13
  else
@@ -48,7 +48,13 @@ module Motor
48
48
 
49
49
  rel = apply_predicates(rel, filters)
50
50
 
51
- alias_tracker = ActiveRecord::Associations::AliasTracker.create(rel.connection, rel.table.name, [])
51
+ alias_tracker =
52
+ if Rails.version.to_f >= 7.2
53
+ rel.alias_tracker
54
+ else
55
+ ActiveRecord::Associations::AliasTracker.create(rel.connection, rel.table.name, [])
56
+ end
57
+
52
58
  filter_clause_factory = ActiveRecord::Relation::FilterClauseFactory.new(rel.klass, rel.predicate_builder)
53
59
 
54
60
  where_clause = filter_clause_factory.build(filters, alias_tracker)
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.4.29'
4
+ VERSION = '0.4.31'
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.4.29
4
+ version: 0.4.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-04 00:00:00.000000000 Z
11
+ date: 2024-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ar_lazy_preload
@@ -176,7 +176,6 @@ files:
176
176
  - app/views/motor/notifications_mailer/notify_mention_email.html.erb
177
177
  - app/views/motor/notifications_mailer/notify_reminder_email.html.erb
178
178
  - app/views/motor/ui/show.html.erb
179
- - config/initializers/audited.rb
180
179
  - config/locales/el.yml
181
180
  - config/locales/en.yml
182
181
  - config/locales/es.yml
@@ -1,5 +0,0 @@
1
- if Rails.gem_version >= Gem::Version.new("7.2")
2
- require 'audited/audit'
3
-
4
- Audited::Audit.abstract_class = true
5
- end