shopify-gold 4.0.3 → 4.0.4

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: 2579432a51ad57061aac690c106fbd57a0dc212f1906ad276ef85c3df146f73f
4
- data.tar.gz: a97f84bdc5c444e7ac9a5aa50ab5b30718513327ca832877f590f10d332700e3
3
+ metadata.gz: bb97c64ad972eef6e38a08521221dd8d0172f06cedd150fa4addf052d8e0cc74
4
+ data.tar.gz: 9d49628b75fb14b48f0cd2b916a8597b6a01583555487e6128b3f99aff53e2b0
5
5
  SHA512:
6
- metadata.gz: 61eeeaece030e7ec2776357d0bf5198cfc5934036da1de089e59044afc35e73abc59675428eca5050f8e31fb3b85133a33daca51b67f41d7b5866a3e51cbd7fc
7
- data.tar.gz: 809eb35fd864c6db0a76217fee511ac0f87c929fae66379f5d48b9b6af85727f4211083a3dc06f913c6e5cff3517eb5a62050b5e25e6079661a6ebceba968318
6
+ metadata.gz: 50d3f46f01f055dfccd98df99e282e6780b91631846dad208910cba9926c18188563f78e7f356af0bb1de41f7203c2e28be3bc8b606ff7c74edc513f02d85dad
7
+ data.tar.gz: e2cbfb96633d0c9a253ce7a8c0f6cf13ad035d2632dc8359c47ca5be71c4c5ab67cbc0c2fb686ca3d9585c5b70e3d152b2792f7fef28b64d30030bc8f5212f52
@@ -40,7 +40,7 @@ module Gold
40
40
 
41
41
  def add_billing
42
42
  referral = Referral.find_by(id: params[:referral_id])
43
- billing = Billing.find(params[:id])
43
+ billing = Billing.find(params[:billing_id])
44
44
 
45
45
  billing.update(referral: referral)
46
46
 
@@ -42,7 +42,7 @@ module Gold
42
42
  def tier
43
43
  billing # Expose the @billing variable to the view
44
44
 
45
- apply_referral_cookie
45
+ apply_referral_cookie unless billing.tier
46
46
 
47
47
  @tiers = Tier.visible
48
48
  end
@@ -8,6 +8,7 @@
8
8
 
9
9
  <div id="collapseReferral" class="collapse mt-3">
10
10
  <%= form_tag(gold_admin_engine.add_billing_referral_path) do %>
11
+ <input type="hidden" name="billing_id" value="<%= billing.id %>">
11
12
  <select name="referral_id">
12
13
  <option value="">None</option>
13
14
  <%= Gold::Referral.all.each do |referral| %>
@@ -1,16 +1,17 @@
1
1
  <%= form_for(referral, url: referral.new_record? ? gold_admin_engine.referrals_path : gold_admin_engine.referral_path(referral.id)) do |f| %>
2
2
  <div class="form-group">
3
- <label>Full name</label>
3
+ <label>Contact name</label>
4
4
  <%= f.text_field :contact_name, class: "form-control" %>
5
5
  </div>
6
6
 
7
7
  <div class="form-group">
8
- <label>Email</label>
8
+ <label>Contact email</label>
9
9
  <%= f.email_field :contact_email, class: "form-control" %>
10
10
  </div>
11
11
 
12
12
  <div class="form-group">
13
13
  <label>Company</label>
14
+ <p class="text-muted">Note: if left blank, merchant won't see a "Be sure to thank company" message.</p>
14
15
  <%= f.text_field :company, class: "form-control" %>
15
16
  </div>
16
17
 
data/config/routes.rb CHANGED
@@ -36,7 +36,7 @@ Gold::AdminEngine.routes.draw do
36
36
  scope :referrals do
37
37
  post "/", to: "admin/referrals#create", as: "referrals"
38
38
  patch "/:id", to: "admin/referrals#update", as: "referral"
39
- post "/:id/billings", to: "admin/referrals#add_billing", as: "add_billing_referral"
39
+ post "/billings", to: "admin/referrals#add_billing", as: "add_billing_referral"
40
40
  delete "/:id", to: "admin/referrals#delete", as: "delete_referral"
41
41
  end
42
42
  end
data/lib/gold/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gold
2
- VERSION = "4.0.3".freeze
2
+ VERSION = "4.0.4".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify-gold
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Smith
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-01-20 00:00:00.000000000 Z
12
+ date: 2020-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  - !ruby/object:Gem::Version
317
317
  version: '0'
318
318
  requirements: []
319
- rubygems_version: 3.0.3
319
+ rubygems_version: 3.0.1
320
320
  signing_key:
321
321
  specification_version: 4
322
322
  summary: Helium's approach to billing for Shopify apps