effective_resources 2.25.14 → 2.25.16

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: bf9636790de9d9e89ffa844dcd0d88abb19d26b6c3cbd9c492aa08ba936c7cbd
4
- data.tar.gz: 8c45b0badf8f6de31dc53baa6ab47d5fac1fd1764c512d1ad6b02d92f198627d
3
+ metadata.gz: d03ec0448b11d0b47522003a6c0f5579d590ab74ea6b96090cfc9f32b858b1f5
4
+ data.tar.gz: a2e35b26e825cc7c8dbf5f5db0e7670e956b2fe958636533b3ffea2439860c62
5
5
  SHA512:
6
- metadata.gz: f0bcf47e270a032a1b6405dc995805b3570a50274ce579bddd5fd943aacd9631ed29a0a5063afc418e75136dc457e85266880e188aaff77877c41f577ca6b5fb
7
- data.tar.gz: 603ff9daf3c4be2bf696cfa1e43a178a245943c21d4004eef2b1fbaa381ba9b000c8a727ad54a4fba5fa10efd55d8f810c8813fa5195e8aec3f56d7e57abf1bd
6
+ metadata.gz: 787cf0d8f97f276fa8f8b4eef9b4676474a88faafb7aed72346eaba3bbfd55cf78fb9c1b409bcb6c8f828d6dbdbb3b13d7c8e68a0cb4ebd2ca09318367b49c39
7
+ data.tar.gz: e807a9d2e7af907d14d62b8f665dce653c11072956c7e849306dcc72305ebf1ad016e88c9264a59258fee9bbaa53c0f39fd1c6fa8b3f3dc6be0f0396d6c55596
@@ -56,16 +56,6 @@ module Effective
56
56
 
57
57
  private
58
58
 
59
- def to_masked_select2(resource)
60
- if resource.respond_to?(:public_email)
61
- "<span>#{resource}</span> <small>#{view_context.masked_email(resource)}</small>"
62
- elsif resource.try(:email).present?
63
- "<span>#{resource}</span> <small>#{resource.email}</small>"
64
- else
65
- "<span>#{resource}</span>"
66
- end
67
- end
68
-
69
59
  def to_select2(resource)
70
60
  if resource.try(:email).present?
71
61
  "<span>#{resource}</span> <small>#{resource.email}</small>"
@@ -22,7 +22,7 @@ module ActsAsPublished
22
22
  included do
23
23
  attr_writer :save_as_draft
24
24
 
25
- before_validation(if: -> { EffectiveResources.falsey?(@save_as_draft) && @save_as_draft.present? }) do
25
+ before_validation(if: -> { EffectiveResources.falsey?(@save_as_draft) && (@save_as_draft.present? || new_record?) }) do
26
26
  self.published_start_at ||= Time.zone.now
27
27
  end
28
28
 
@@ -295,4 +295,8 @@ module EffectiveDeviseUser
295
295
  [:email, :public_email, :first_name, :last_name, :name]
296
296
  end
297
297
 
298
+ def to_select2
299
+ "<span>#{email_to_s}</span> <small>#{email}</small>"
300
+ end
301
+
298
302
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.25.14'.freeze
2
+ VERSION = '2.25.16'.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.25.14
4
+ version: 2.25.16
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: 2024-08-30 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails