effective_resources 2.15.0 → 2.16.1

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: fd61b5df998f90f23f8564279a7dc20840cf169c5114b026ff7cadef9978f00f
4
- data.tar.gz: 1106d08aabdc5053db5fb6e78db263be7157b477b78dc6162f7edc8feef10ede
3
+ metadata.gz: 3b1e8e92150d8fa0101d28d961ccac6f0b8826a2992e22abe0f7f38ae185a498
4
+ data.tar.gz: c479a6c8c700a8125241914ffe0a17a1b58da136fc28479d6d1f1a5005241575
5
5
  SHA512:
6
- metadata.gz: 8815dfa572def42ccad3f5731af8fffe847992a997568a2fd867a4b1586ec51716bfd368d42df15f5578fa2a3759ada115e09243ee225314aa7b3d1f30e14412
7
- data.tar.gz: 1abf591d59b8a0ec96bfe05f8a2d0e6776389b7016a47ae72bc0bf010a70f33c8f7719a4b4e0424c55b0869c6eb3afc9ce9f82984ce7769800b637c4c0c992cd
6
+ metadata.gz: 2db488f338acda47184ea4bf2a41d1420f338738ad97f98635e66353d00d9a5edcf61aaace5351c38becec2ee80f4884fcd7a522a3f661baa4f9b2671f0a23bb
7
+ data.tar.gz: cbaea70caa43ceeb87b17fa1a31162c5d4b5369e3e5435073fb73b05c5c0dcb564f12948fb88dc62b010c1485e06880999c320c9c8a31bc01ad905df6a9e5668
@@ -82,7 +82,8 @@ module Effective
82
82
  private
83
83
 
84
84
  def resource_scope
85
- effective_resource.relation
85
+ relation = effective_resource.relation
86
+ relation.try(:deep) || relation
86
87
  end
87
88
 
88
89
  def resource_name # 'thing'
@@ -6,7 +6,11 @@ module EffectiveActsAsEmailFormHelper
6
6
  raise('expected a form') unless form.respond_to?(:object)
7
7
 
8
8
  resource = form.object
9
- raise('expected an acts_as_email_form resource') unless resource.class.respond_to?(:acts_as_email_form?)
9
+
10
+ # Intended for acts_as_email_form but sometimes we use a duck typed object to save these fields as well
11
+ unless resource.class.respond_to?(:acts_as_email_form?) || resource.respond_to?("email_form_action=")
12
+ raise('expected an acts_as_email_form resource or one that responds to email_form_action')
13
+ end
10
14
 
11
15
  # Load the template.
12
16
  email_template = if action.present? && defined?(EffectiveEmailTemplates)
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.15.0'.freeze
2
+ VERSION = '2.16.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.0
4
+ version: 2.16.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: 2023-10-26 00:00:00.000000000 Z
11
+ date: 2023-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails