effective_orders 4.3.1 → 4.3.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbc56753acb82a9f43d3c6cd058e4351cf54ee58d4df9fad0f266bb88d40af19
|
4
|
+
data.tar.gz: 4537fe9ccd27a6aeb1d659bedbe620e8e85d17f78f76609396c5fb05a4e79dc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46733ccd15b8de247c865c88df956deb0e66234ca614aab1db0b79e60fade92c7b18c98b06ab508e6776d55cbf83c9dae6c7bf17b6598747f8739d019b17e382
|
7
|
+
data.tar.gz: bb9b03c81ed435ffd7dfe7320c975f0d76d86e45ec6e149b0667e6094107505cb0e9abcbefaa9cb8e2af3707e77aa29b1a2b1466dfc65dbc8fc5cc1ade3f8f81
|
@@ -4,10 +4,6 @@ module Admin
|
|
4
4
|
|
5
5
|
layout (EffectiveOrders.layout.kind_of?(Hash) ? EffectiveOrders.layout[:admin_orders] : EffectiveOrders.layout)
|
6
6
|
|
7
|
-
# def effective_resource
|
8
|
-
# @_effective_resource ||= Effective::Resource.new('effective/order', namespace: :admin)
|
9
|
-
# end
|
10
|
-
|
11
7
|
def new
|
12
8
|
@order = Effective::Order.new
|
13
9
|
|
@@ -89,7 +89,11 @@ class EffectiveOrdersDatatable < Effective::Datatable
|
|
89
89
|
scope = EffectiveOrders.orders_collection_scope.call(scope)
|
90
90
|
end
|
91
91
|
|
92
|
-
attributes[:user_id].present?
|
92
|
+
if attributes[:user_id].present?
|
93
|
+
scope = scope.where(user_id: attributes[:user_id])
|
94
|
+
end
|
95
|
+
|
96
|
+
scope
|
93
97
|
end
|
94
98
|
|
95
99
|
end
|
@@ -29,7 +29,7 @@ module Effective
|
|
29
29
|
attr_accessor :skip_buyer_validations # Set by Admin::Orders#create
|
30
30
|
|
31
31
|
belongs_to :user, validate: false # This is the buyer/user of the order. We validate it below.
|
32
|
-
has_many :order_items, -> { order(:id) }, inverse_of: :order, class_name: 'Effective::OrderItem'
|
32
|
+
has_many :order_items, -> { order(:id) }, inverse_of: :order, class_name: 'Effective::OrderItem', dependent: :delete_all
|
33
33
|
|
34
34
|
accepts_nested_attributes_for :order_items, allow_destroy: false, reject_if: :all_blank
|
35
35
|
accepts_nested_attributes_for :user, allow_destroy: false, update_only: true
|
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: 4.3.
|
4
|
+
version: 4.3.2
|
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: 2020-04-
|
11
|
+
date: 2020-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|