effective_orders 4.0.0beta15 → 4.0.0beta16
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfed4c5207c463fed6c3d0adfe543cdf6d7179b0
|
4
|
+
data.tar.gz: 34169145a782863e3714d19c623b023b8e93cd6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c6b21fb32445e76d6d8b4921d6f15923f8cd1c60c2aa969b605735d38ab3a95aed776ea3bc1c17cdcf95798a794ed0dfd7efabcc5662e13965f8c698ba30dfe
|
7
|
+
data.tar.gz: f219625d20fda0dbc0f2b8d1b085f9dc1a04391cfdeb8753dd8b1947ca58cb3c91126a540947d0f33697b923195003796a78719436350d02223e278017ebd136
|
@@ -1,5 +1,19 @@
|
|
1
1
|
module EffectiveSubscriptionsHelper
|
2
2
|
|
3
|
+
def render_plan(plan, subscribed: true)
|
4
|
+
render(render_plan_partial(plan), plan: plan, subscribed: subscribed)
|
5
|
+
end
|
6
|
+
|
7
|
+
def render_plan_partial(plan)
|
8
|
+
if lookup_context.template_exists?("effective/subscriptions/#{plan[:id].downcase}", [], true)
|
9
|
+
"effective/subscriptions/#{plan[:id].downcase}" # Render the app's views/effective/subscriptions/_gold.html.haml
|
10
|
+
elsif lookup_context.template_exists?("effective/subscriptions/#{plan[:name].downcase}", [], true)
|
11
|
+
"effective/subscriptions/#{plan[:name].downcase}" # Render the app's views/effective/subscriptions/_gold.html.haml
|
12
|
+
else
|
13
|
+
'effective/subscriptions/plan' # Render effective_orders default plan panel
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
3
17
|
def stripe_plans_collection(form)
|
4
18
|
raise 'expected an Effective::FormBuilder object' unless form.class.name == 'Effective::FormBuilder'
|
5
19
|
|
@@ -16,17 +30,7 @@ module EffectiveSubscriptionsHelper
|
|
16
30
|
end
|
17
31
|
|
18
32
|
plans.map do |plan|
|
19
|
-
|
20
|
-
if lookup_context.template_exists?("effective/subscriptions/#{plan[:id].downcase}", [], true)
|
21
|
-
"effective/subscriptions/#{plan[:id].downcase}" # Render the app's views/effective/subscriptions/_gold.html.haml
|
22
|
-
elsif lookup_context.template_exists?("effective/subscriptions/#{plan[:name].downcase}", [], true)
|
23
|
-
"effective/subscriptions/#{plan[:name].downcase}" # Render the app's views/effective/subscriptions/_gold.html.haml
|
24
|
-
else
|
25
|
-
'effective/subscriptions/plan' # Render effective_orders default plan panel
|
26
|
-
end
|
27
|
-
)
|
28
|
-
|
29
|
-
content = render(partial: partial, locals: {
|
33
|
+
content = render(partial: render_plan_partial(plan), locals: {
|
30
34
|
f: form,
|
31
35
|
plan: plan,
|
32
36
|
selected: Array(form.object.stripe_plan_id).include?(plan[:id]),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.0beta16
|
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: 2018-07-
|
11
|
+
date: 2018-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|