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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87fb0ca165c108a20ebe59aac875f51993d7893e
4
- data.tar.gz: e3d57525e215f995bcd5461e7882b1948b2c2f10
3
+ metadata.gz: 74b9cc11b2915cf6a3cb6aa62104f6eaf77c3c33
4
+ data.tar.gz: dd6804ed2e43a0cb6d87b41ed06c4bd27b4638a6
5
5
  SHA512:
6
- metadata.gz: f3a6480f68ab69613d6ee3db64bee5b02d5a1b3bbc7a989c083a5dd1b2f2ffa13508ce33267c17a9e58d964dfcba2887af127ee713c5e1e3704cdd4e4ad053c8
7
- data.tar.gz: dfebb91aa974e2a86fb4b7f78202740fcc726eb8e997a4d98efd0fce012f9083e936e80c6eb980a8774b5ddd8e1feee5426ba07ae72422d0e585b1f76f863c1f
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)
@@ -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
@@ -1,5 +1,7 @@
1
1
  module Spree
2
2
  class Taxonomy < Spree::Base
3
+ acts_as_list
4
+
3
5
  validates :name, presence: true
4
6
 
5
7
  has_many :taxons, inverse_of: :taxonomy
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- "2.4.5"
3
+ "2.4.6"
4
4
  end
5
5
  end
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.5
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-03 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant