spree_frontend 2.0.8 → 2.0.9

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
  SHA1:
3
- metadata.gz: 720de19081a15e84f769e40a110468b72a3e1aca
4
- data.tar.gz: 408a70061fb1e16df28c76643ec3ce3ee7ffcadc
3
+ metadata.gz: 64077b9123497e4b638840c08c2453c8c7ac82d3
4
+ data.tar.gz: 5cd14a59a0a0722a4921ee932d2a3604d8c59101
5
5
  SHA512:
6
- metadata.gz: ee8445a2a30daf3e2f409efa48628017b0c30ae72d14da45dbaf3917e25b9bf014dee1fae71ab8ba817a93a00dc8c1c061919646ecc22832cd75f407706700a3
7
- data.tar.gz: 1dcf80fe7ead87d96d41ec7a9aa26f1699ae7099c69709b23bd99e76d1b00fe192ec7be5f6e760d986494a22752bad56ee49ccbe5b1a53cbf82e9ec180d8a064
6
+ metadata.gz: 703680fc63d3d06164be0e64b6bffc3f967fb2f69610e4d8591a6f72739f168f30fec8017e7ab6870aa42460adac7cc1ca34734a4ed2bcab2d4f236f11bf4f12
7
+ data.tar.gz: add57c3a55e9a1e3b6d8f09eec1a15a94a4cbaf23fb778af084a054710ef2aa68cda2cca103433893e5583e3fb8f65b8a4919c4528ec3a4a90d53a08a4c39e60
@@ -6,7 +6,7 @@ module Spree
6
6
  class CheckoutController < Spree::StoreController
7
7
  ssl_required
8
8
 
9
- before_filter :load_order
9
+ before_filter :load_order_with_lock
10
10
 
11
11
  before_filter :ensure_order_not_completed
12
12
  before_filter :ensure_checkout_allowed
@@ -70,8 +70,8 @@ module Spree
70
70
  false
71
71
  end
72
72
 
73
- def load_order
74
- @order = current_order
73
+ def load_order_with_lock
74
+ @order = current_order(lock: true)
75
75
  redirect_to spree.cart_path and return unless @order
76
76
 
77
77
  if params[:state]
@@ -13,7 +13,7 @@ module Spree
13
13
  end
14
14
 
15
15
  def update
16
- @order = current_order
16
+ @order = current_order(lock: true)
17
17
  unless @order
18
18
  flash[:error] = Spree.t(:order_not_found)
19
19
  redirect_to root_path and return
@@ -43,13 +43,13 @@ module Spree
43
43
 
44
44
  # Shows the current incomplete order from the session
45
45
  def edit
46
- @order = current_order(true)
46
+ @order = current_order(create_order_if_necessary: true)
47
47
  associate_user
48
48
  end
49
49
 
50
50
  # Adds a new item to the order (creating a new order if none already exists)
51
51
  def populate
52
- populator = Spree::OrderPopulator.new(current_order(true), current_currency)
52
+ populator = Spree::OrderPopulator.new(current_order(create_order_if_necessary: true), current_currency)
53
53
  if populator.populate(params.slice(:products, :variants, :quantity))
54
54
  current_order.ensure_updated_shipments
55
55
 
@@ -7,7 +7,7 @@
7
7
  <ul>
8
8
  <% @product.variants_and_option_values(current_currency).each_with_index do |variant, index| %>
9
9
  <li>
10
- <%= radio_button_tag "products[#{@product.id}]", variant.id, index == 0, 'data-price' => variant.price_in(current_currency).display_price %>
10
+ <%= radio_button_tag "products[#{@product.id}]", variant.id, index == 0, 'data-price' => Spree::Money.new(variant.price, with_currency: true).to_s %>
11
11
  <label for="<%= ['products', @product.id, variant.id].join('_') %>">
12
12
  <span class="variant-description">
13
13
  <%= variant_options variant %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.8
19
+ version: 2.0.9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.8
26
+ version: 2.0.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_api
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.8
33
+ version: 2.0.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.8
40
+ version: 2.0.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jquery-rails
43
43
  requirement: !ruby/object:Gem::Requirement