effective_orders 5.7.1 → 5.7.4

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
  SHA256:
3
- metadata.gz: 1ed47eb29f0eb40e2b50f31007a7c7d27c01a0d511e2b5a0de59c4677a2d19c3
4
- data.tar.gz: c9f86388847d98ff584118155e14cf783431be89a4a18d8b81d8ea8446c44d10
3
+ metadata.gz: ccd5fb4a32b778af10466e4b8eab1fd40de1c9c7bf6033960ae1b72ea8254ea8
4
+ data.tar.gz: c32de9af51826855c96fc33364be02fb0c7efbeee78206de5268dd1636f388fe
5
5
  SHA512:
6
- metadata.gz: a654abd31e39c1e933136279289b77ba9b8afe33c56f3d5b745d73c9c85e15c0316d597a25093a0b987bcb135b1e9c4ca7d37719db3615f9a0718f25fc7adc39
7
- data.tar.gz: b67584c4477f8012fd50f988e535a22591bd52a38d76e5db065ce68f3bc279ab11bdd9436ba86b0153e637788c9667895ac0ff93a7bc975d1d0842693fcbfb50
6
+ metadata.gz: e191aad0d3e26a3f0f1f221c196e3351c269cd3f7dc19d21f77b45de3a8b52f65a6f5428099d376f59d9463d03720828c0634b1c3bea40aed482cc99e983e3c3
7
+ data.tar.gz: d97326c36979460db32c854ee210fdec62eb1ff21a2e344163040f66dff1cc163241ac344af41e4e58dae2a3e203aeaa77e244e755cd6e3c63df4fee8fdf277e
@@ -33,7 +33,7 @@ module Effective
33
33
  accepts_nested_attributes_for :user, allow_destroy: false, update_only: true
34
34
 
35
35
  has_many :order_items, -> { order(:id) }, inverse_of: :order, dependent: :delete_all
36
- accepts_nested_attributes_for :order_items, allow_destroy: false, reject_if: :all_blank
36
+ accepts_nested_attributes_for :order_items, allow_destroy: true, reject_if: :all_blank
37
37
 
38
38
  # Attributes
39
39
  effective_resource do
@@ -1,9 +1,10 @@
1
1
  = effective_form_with(model: [:admin, order], engine: true) do |f|
2
2
  = f.hidden_field :user_type, value: (f.object.user || current_user).class.name
3
3
 
4
+ - ajax_url = (@select2_ajax_path || effective_resources.users_admin_select2_ajax_index_path) unless Rails.env.test?
5
+
4
6
  = f.select :user_id, current_user.class.all, label: 'Buyer', required: true,
5
- ajax_url: effective_resources.users_admin_select2_ajax_index_path,
6
- hint: 'The user that should purchase this order.'
7
+ ajax_url: ajax_url, hint: 'The user that should purchase this order.'
7
8
 
8
9
  = f.email_cc_field :cc, hint: "Cc the above on any emailed receipts or payment requests."
9
10
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '5.7.1'.freeze
2
+ VERSION = '5.7.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.7.1
4
+ version: 5.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-24 00:00:00.000000000 Z
11
+ date: 2022-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails