spree_account_recurring 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/app/models/spree/recurring.rb +6 -0
- data/app/views/spree/admin/recurrings/edit.html.erb +3 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Installation
|
|
11
11
|
Install `spree_account_recurring` by adding the following to your `Gemfile`:
|
12
12
|
|
13
13
|
```ruby
|
14
|
-
gem 'spree_account_recurring', '1.0.
|
14
|
+
gem 'spree_account_recurring', '1.0.4'
|
15
15
|
```
|
16
16
|
|
17
17
|
Bundle your dependencies and run the installation generator:
|
@@ -10,6 +10,8 @@ module Spree
|
|
10
10
|
has_many :plans
|
11
11
|
attr_readonly :type
|
12
12
|
validates :type, :name, presence: true
|
13
|
+
validates :type, uniqueness: { message: 'of provider recurring already exists' }
|
14
|
+
|
13
15
|
scope :active, -> { undeleted.where(active: true) }
|
14
16
|
|
15
17
|
def self.display_name
|
@@ -23,5 +25,9 @@ module Spree
|
|
23
25
|
def default_plan
|
24
26
|
plans.default
|
25
27
|
end
|
28
|
+
|
29
|
+
def has_preferred_keys?
|
30
|
+
preferred_secret_key.present? && preferred_public_key.present?
|
31
|
+
end
|
26
32
|
end
|
27
33
|
end
|
@@ -16,7 +16,9 @@
|
|
16
16
|
<fieldset class="no-border-top">
|
17
17
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
18
18
|
<div data-hook="buttons" class="filter-actions actions">
|
19
|
-
|
19
|
+
<% if @recurring.has_preferred_keys? %>
|
20
|
+
<%= button_link_to Spree.t(:manage_plans), admin_recurring_plans_url(@recurring) %>
|
21
|
+
<% end %>
|
20
22
|
<%= button Spree.t('actions.update'), 'icon-refresh' %>
|
21
23
|
</div>
|
22
24
|
</fieldset>
|
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:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 4
|
10
|
+
version: 1.0.4
|
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-
|
18
|
+
date: 2014-04-25 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: spree_core
|