spree_core 2.4.5 → 2.4.6
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/models/spree/option_type.rb +2 -0
- data/app/models/spree/promotion.rb +2 -2
- data/app/models/spree/refund.rb +5 -0
- data/app/models/spree/taxonomy.rb +2 -0
- data/lib/spree/core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74b9cc11b2915cf6a3cb6aa62104f6eaf77c3c33
|
4
|
+
data.tar.gz: dd6804ed2e43a0cb6d87b41ed06c4bd27b4638a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8cb30c856f1491e29066c9afb33aeaa0791cd904d7bc8be5824b9c4bcb0eeaa9c7589cf4f72e4cf215bc10e46fd58f6c51b9fa6804e36123334ff326f454a03
|
7
|
+
data.tar.gz: b199cffe7f6c2e46af52e2bb1d68cfeb98a2fa888829f0bf0be962e24b7dd59b2886b4f38d6c693007964cf660b0c0f39f144cc0e2eb74cdb8952860832f4a85
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module Spree
|
2
2
|
class OptionType < Spree::Base
|
3
|
+
acts_as_list
|
4
|
+
|
3
5
|
has_many :option_values, -> { order(:position) }, dependent: :destroy, inverse_of: :option_type
|
4
6
|
has_many :product_option_types, dependent: :destroy, inverse_of: :option_type
|
5
7
|
has_many :products, through: :product_option_types
|
@@ -41,8 +41,8 @@ module Spree
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def self.active
|
44
|
-
where('starts_at IS NULL OR starts_at < ?', Time.now).
|
45
|
-
where('expires_at IS NULL OR expires_at > ?', Time.now)
|
44
|
+
where('spree_promotions.starts_at IS NULL OR spree_promotions.starts_at < ?', Time.now).
|
45
|
+
where('spree_promotions.expires_at IS NULL OR spree_promotions.expires_at > ?', Time.now)
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.order_activatable?(order)
|
data/app/models/spree/refund.rb
CHANGED
@@ -47,6 +47,7 @@ module Spree
|
|
47
47
|
|
48
48
|
self.transaction_id = @response.authorization
|
49
49
|
update_columns(transaction_id: transaction_id)
|
50
|
+
update_order
|
50
51
|
end
|
51
52
|
|
52
53
|
# return an activemerchant response object if successful or else raise an error
|
@@ -87,5 +88,9 @@ module Spree
|
|
87
88
|
errors.add(:amount, :greater_than_allowed)
|
88
89
|
end
|
89
90
|
end
|
91
|
+
|
92
|
+
def update_order
|
93
|
+
payment.order.updater.update
|
94
|
+
end
|
90
95
|
end
|
91
96
|
end
|
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|