effective_resources 2.7.1 → 2.7.3
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 +4 -4
- data/app/controllers/concerns/effective/crud_controller.rb +4 -4
- data/app/helpers/effective_resources_helper.rb +1 -1
- data/app/models/concerns/acts_as_purchasable_wizard.rb +1 -1
- data/app/models/concerns/acts_as_wizard.rb +5 -1
- data/app/models/concerns/effective_devise_user.rb +32 -0
- data/lib/effective_resources/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e36a25d824db2b9794dd755ee4311385e59e0061448ce72f6e018c37ae2dc09
|
4
|
+
data.tar.gz: a9ac9af3756f705d50a545810e22e5179f2febdd9754fbbdf2e0b825e12bc149
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6acf08c36bf3ce4c15c225a1605594d1d2e6b19c20c3cb199bb13e9f312ce8a0edaff5c8665811c71491802c5a53cee2f6dab383e92de4485a8217c9eb4f9004
|
7
|
+
data.tar.gz: b94c04b3a8e3512af8f3f554091b604f2317511e9575900d3c8fc541a56b16729f620e02a5ad60b8b3b598a1bee4cdd9a2fb94d7597e4330af87ec10503b4dc4
|
@@ -74,16 +74,16 @@ module Effective
|
|
74
74
|
super
|
75
75
|
end
|
76
76
|
|
77
|
+
def resource_klass # Thing
|
78
|
+
effective_resource.klass
|
79
|
+
end
|
80
|
+
|
77
81
|
private
|
78
82
|
|
79
83
|
def resource_scope
|
80
84
|
effective_resource.relation
|
81
85
|
end
|
82
86
|
|
83
|
-
def resource_klass # Thing
|
84
|
-
effective_resource.klass
|
85
|
-
end
|
86
|
-
|
87
87
|
def resource_name # 'thing'
|
88
88
|
effective_resource.name
|
89
89
|
end
|
@@ -274,7 +274,7 @@ module EffectiveResourcesHelper
|
|
274
274
|
title = resource.wizard_step_title(step)
|
275
275
|
raise("expected a title for step #{step}") unless title.present?
|
276
276
|
|
277
|
-
link = if edit_effective_wizard? && resource.can_visit_step?(step)
|
277
|
+
link = if edit_effective_wizard? && resource.is_a?(controller.resource_klass) && resource.can_visit_step?(step)
|
278
278
|
link_to('Edit', wizard_path(step), title: "Edit #{title}")
|
279
279
|
end
|
280
280
|
|
@@ -53,7 +53,7 @@ module ActsAsPurchasableWizard
|
|
53
53
|
|
54
54
|
# Make sure all Fees are valid
|
55
55
|
fees.each do |fee|
|
56
|
-
raise(
|
56
|
+
raise("expected a valid fee but #{fee.id} had errors #{fee.errors.inspect}") unless fee.valid?
|
57
57
|
end
|
58
58
|
|
59
59
|
# A membership could go from individual to organization
|
@@ -57,6 +57,10 @@ module ActsAsWizard
|
|
57
57
|
self.class.const_get(:WIZARD_STEPS).keys
|
58
58
|
end
|
59
59
|
|
60
|
+
def completed_steps
|
61
|
+
wizard_steps.keys
|
62
|
+
end
|
63
|
+
|
60
64
|
def required_steps
|
61
65
|
return self.class.test_required_steps if Rails.env.test? && self.class.test_required_steps.present?
|
62
66
|
|
@@ -85,7 +89,7 @@ module ActsAsWizard
|
|
85
89
|
# For use in the summary partials. Does not include summary.
|
86
90
|
def render_steps
|
87
91
|
blacklist = [:start, :billing, :checkout, :submitted, :summary]
|
88
|
-
(required_steps - blacklist).select { |step| has_completed_step?(step) }
|
92
|
+
(required_steps + completed_steps - blacklist).select { |step| has_completed_step?(step) }
|
89
93
|
end
|
90
94
|
|
91
95
|
def wizard_step_title(step)
|
@@ -72,6 +72,38 @@ module EffectiveDeviseUser
|
|
72
72
|
[:email, :password, :password_confirmation, :first_name, :last_name, :name, :login]
|
73
73
|
end
|
74
74
|
|
75
|
+
def filter_parameters
|
76
|
+
[
|
77
|
+
:encrypted_password,
|
78
|
+
:reset_password_token,
|
79
|
+
:reset_password_sent_at,
|
80
|
+
:remember_created_at,
|
81
|
+
:sign_in_count,
|
82
|
+
:current_sign_in_at,
|
83
|
+
:last_sign_in_at,
|
84
|
+
:current_sign_in_ip,
|
85
|
+
:last_sign_in_ip,
|
86
|
+
:invitation_token,
|
87
|
+
:invitation_created_at,
|
88
|
+
:invitation_sent_at,
|
89
|
+
:invitation_accepted_at,
|
90
|
+
:invitation_limit,
|
91
|
+
:invited_by_type,
|
92
|
+
:invited_by_id,
|
93
|
+
:invitations_count,
|
94
|
+
:uid,
|
95
|
+
:provider,
|
96
|
+
:access_token,
|
97
|
+
:refresh_token,
|
98
|
+
:token_expires_at,
|
99
|
+
:avatar_url,
|
100
|
+
:roles_mask,
|
101
|
+
:confirmation_sent_at,
|
102
|
+
:confirmed_at,
|
103
|
+
:unconfirmed_email
|
104
|
+
]
|
105
|
+
end
|
106
|
+
|
75
107
|
def from_omniauth(auth, params)
|
76
108
|
invitation_token = (params.presence || {})['invitation_token']
|
77
109
|
|
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.7.
|
4
|
+
version: 2.7.3
|
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-04-
|
11
|
+
date: 2023-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|