thecore_backend_commons 3.4.0 → 3.4.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: e7db8739006ce3d17f311656e5e475aacd9a216f9bbaca6a1b863c67b6076c25
4
- data.tar.gz: bacadaf2fc6496435e66e15655b2968368973b2550eed642e993c6be76b6928c
3
+ metadata.gz: 47f357e5a5b355623f7eaa5443e8ba8cfb5566311f6c5f866cbda9740a48a044
4
+ data.tar.gz: 52725ea116ba712bc9c68b4c3b757c2a64a7b1270b2efd1f56cd16c503d21bbe
5
5
  SHA512:
6
- metadata.gz: 96ca054fe828e25f053dc4d213ccc0856e4fe52fbc7ee8a4b525c3252087b661f69a3baec6b01c96ba9bccf740fed489b0886c65b6db65c5567ef3d667e740a3
7
- data.tar.gz: 979ce14b47d8eaa36a7cf721f0b1771d74c0f20d5ffbbb9686bd35ed136c077224a240fd796dddc3070d6ac577fb5a3b6fcf604a66104746bc1e7e326a14e1a1
6
+ metadata.gz: fbb02e11840fdd2608ce289285424c5792e50ce09ef207c08a4aafd943761e01f2ed72e50bbe855c0fb8d35e61bb6e24c0ee170d335d26f19f8645b00b918d1e
7
+ data.tar.gz: cfbcd1ecdfb625c4eaa3119a64394afb73806f5c764b3c7982a44432aee24143de465ec268a60ed927714abf0702190e751401377d703dbe4226cc4bd49ac2b8
@@ -7,5 +7,7 @@ Rails.application.configure do
7
7
  ApplicationRecord.subclasses.each do |d|
8
8
  d.send(:include, BaseApplicationRecordConcern) unless d.name.start_with?("ActiveStorage::", "ActionText::")
9
9
  end
10
+
11
+ User.send(:include, ThecoreBackendCommonsUserConcern)
10
12
  end
11
13
  end
@@ -0,0 +1,14 @@
1
+ # config.to_prepare do
2
+ # User.class_eval do
3
+ # has_many :push_subscribers, dependent: :destroy
4
+ # end
5
+ # end
6
+
7
+ module ThecoreBackendCommonsUserConcern
8
+ extend ActiveSupport::Concern
9
+
10
+ included do
11
+ has_many :push_subscribers, dependent: :destroy
12
+ has_many :sent_push_messages, class_name: "PushMessage", foreign_key: :sender_user_id, dependent: :destroy
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module ThecoreBackendCommons
2
- VERSION = "3.4.0".freeze
2
+ VERSION = "3.4.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_backend_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -215,6 +215,7 @@ files:
215
215
  - config/initializers/concern_cable_connection.rb
216
216
  - config/initializers/concern_integer.rb
217
217
  - config/initializers/concern_string.rb
218
+ - config/initializers/concern_user.rb
218
219
  - config/initializers/extension_nil.rb
219
220
  - config/initializers/extension_string.rb
220
221
  - config/locales/en.devise.custom.yml