spree_account_recurring 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ module Spree
21
21
 
22
22
  def destroy
23
23
  if @subscription.save_and_manage_api(unsubscribed_at: Time.current)
24
- redirect_to plans_path, notice: "Subscription has been cancelled."
24
+ redirect_to recurring_plans_path, notice: "Subscription has been cancelled."
25
25
  else
26
26
  render :show
27
27
  end
@@ -32,14 +32,14 @@ module Spree
32
32
  def find_active_plan
33
33
  unless @plan = Spree::Plan.active.where(id: params[:plan_id]).first
34
34
  flash[:error] = "Plan not found."
35
- redirect_to plans_url
35
+ redirect_to recurring_plans_url
36
36
  end
37
37
  end
38
38
 
39
39
  def find_plan
40
40
  unless @plan = Spree::Plan.where(id: params[:plan_id]).first
41
41
  flash[:error] = "Plan not found."
42
- redirect_to plans_url
42
+ redirect_to recurring_plans_url
43
43
  end
44
44
  end
45
45
 
@@ -40,7 +40,7 @@ module Spree
40
40
  end
41
41
 
42
42
  def stripe_amount(amount)
43
- amount * 100
43
+ (amount * 100).to_i
44
44
  end
45
45
  end
46
46
  end
@@ -0,0 +1,9 @@
1
+ class ChangeDatatypeForAmountInSpreePlans < ActiveRecord::Migration
2
+ def up
3
+ change_column :spree_plans, :amount, :decimal, :scale => 2, :precision => 8
4
+ end
5
+
6
+ def down
7
+ change_column :spree_plans, :amount, :integer
8
+ end
9
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_account_recurring
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Priyank Gupta
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-04-04 00:00:00 Z
18
+ date: 2014-04-07 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: spree_core
@@ -149,6 +149,7 @@ files:
149
149
  - db/migrate/20140301141327_add_stripe_customer_id_to_spree_users.rb
150
150
  - db/migrate/20140303072857_add_default_to_spree_plans.rb
151
151
  - db/migrate/20140319092254_add_response_to_spree_subscription_events.rb
152
+ - db/migrate/20140404114919_change_datatype_for_amount_in_spree_plans.rb
152
153
  homepage: http://vinsol.com
153
154
  licenses: []
154
155