effective_resources 2.2.9 → 2.2.10

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: cb2b489df65b7ef3e426fa8e43fe5e142560f861c7c1f7a2d580b3ce864d74d4
4
- data.tar.gz: 7776fbc00d3ad40f8c8ac6ccff80ff2e114c48b52f47d59ea054ae4bddfaf15d
3
+ metadata.gz: 3f5258d38255a23862d15be45d82d15d68596bb42b2f31f88e5159c339e2fae8
4
+ data.tar.gz: c6dba77a6cdb45ec02fead79b8050cee8c482325ec772a53ffde5cea9facc754
5
5
  SHA512:
6
- metadata.gz: 1b3d35a468f47af10084426d26d461d5168a6637bfe973b0ba5182bf65cbd1a4804255f956d28a558bc227b4ed986d8ad47eaf39385639db18b9e27afa6a1a24
7
- data.tar.gz: e9bfd478683a588e25f4a24986d9f695485e4d59451af70415c83852a7fe0f48ec7b7211b000b0541e19e931154df8f2ccf2362e6c785c1fba072dd42120fed7
6
+ metadata.gz: c0f15eacdd2e1b34c85b57921dd21d01f3dfb1b22e45f17b45c2f0a066add4f0ede0856e649e843a77c016212c5133e88b780980ce48cc30c844a6e0e735149c
7
+ data.tar.gz: 22088c964406e716aa5d430372813632064278e1a02e1a4fa09f6845a1a8d55b5799a14ce2d29329b624fe59d7d7b1710fcb0437242c345848de21e9bd2a46cb
@@ -4,6 +4,8 @@
4
4
  # Pass 'has_many_purgable :files, :avatar' to only allow the files and avatar to be purged.
5
5
  # Works with effective_bootstrap file_field to display a Delete file on save checkbox
6
6
  # to submit a _purge_attached array or association names to purge.
7
+ #
8
+ # You must permit the attribute _purge_attached: []
7
9
 
8
10
  module HasManyPurgable
9
11
  extend ActiveSupport::Concern
@@ -30,6 +32,10 @@ module HasManyPurgable
30
32
 
31
33
  attr_accessor :_purge_attached
32
34
 
35
+ effective_resource do
36
+ _purge_attached :permitted_param
37
+ end
38
+
33
39
  with_options(if: -> { _purge_attached.present? }) do
34
40
  before_validation { has_many_purgable_mark_for_destruction }
35
41
  after_save { has_many_purgable_purge }
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.2.9'.freeze
2
+ VERSION = '2.2.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.9
4
+ version: 2.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect