effective_resources 2.42.0 → 2.44.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 230f1319172f4e65e05a5dae2446bf8ede99272ba39e1195b67c77d27efc028a
|
|
4
|
+
data.tar.gz: 815fc04917f16a6f556b865d8e886c9a097cb272d3a320dfae652bca2b3d7793
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16f0497fa19c57ff34abb0d52ed4eec9a924bd62c94494e54204be0d0344621d27ca9c1f8591675d72956e502217dd431a55941f3a741a1b0ae6180a625a904b
|
|
7
|
+
data.tar.gz: b89b4269ce2ee1924b03c8475c183f48a4fac146a0e768a8080a8a00c92f041ba1aaa93d664a240b3be67adf9446df12bf14c545d9dcfc21105d45f2cfc2ad62
|
|
@@ -38,7 +38,7 @@ module EffectiveResourcesWizardHelper
|
|
|
38
38
|
if (current || disabled)
|
|
39
39
|
content_tag(:a, label, class: klass)
|
|
40
40
|
else
|
|
41
|
-
link_to(label, path || wizard_path(nav_step), class: klass, 'data-turbolinks': false)
|
|
41
|
+
link_to(label, path || wizard_path(nav_step), class: klass, 'data-turbolinks': false, 'data-turbo': false)
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
@@ -55,10 +55,6 @@ module EffectiveDeviseUser
|
|
|
55
55
|
errors.add(:alternate_email, 'cannot be the same as email') if email.strip.downcase == alternate_email.strip.downcase
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
validate(if: -> { first_name.present? && last_name.present? }) do
|
|
59
|
-
errors.add(:last_name, "can't match first name") if first_name == last_name
|
|
60
|
-
end
|
|
61
|
-
|
|
62
58
|
# Uniqueness validation of emails and alternate emails across all users
|
|
63
59
|
validate(if: -> { respond_to?(:alternate_email) }) do
|
|
64
60
|
records = self.class.where.not(id: id)
|
|
@@ -185,7 +181,10 @@ module EffectiveDeviseUser
|
|
|
185
181
|
user = to_adapter.find_first(conditions)
|
|
186
182
|
return user if user.present? && user.persisted?
|
|
187
183
|
|
|
188
|
-
|
|
184
|
+
email = conditions[:email]
|
|
185
|
+
return unless has_alternate_email? && email.present?
|
|
186
|
+
|
|
187
|
+
to_adapter.find_first(conditions.except(:email).merge(alternate_email: email))
|
|
189
188
|
end
|
|
190
189
|
|
|
191
190
|
# https://github.com/heartcombo/devise/blob/f6e73e5b5c8f519f4be29ac9069c6ed8a2343ce4/lib/devise/models/database_authenticatable.rb#L216
|