effective_orders 4.4.10 → 4.5.0

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: c92ae430fbce8f9ee7692d921653fffda8419a6d76eb2a4b43f3efcc932b7902
4
- data.tar.gz: 9ce838e457cb9a3d365641b1d6d975f55fa118eed1df7be6d8071044a845fc38
3
+ metadata.gz: f0bcae4f96f01459844e667c3c9c426a2eac78084e2cfcccb3dc630874554bf8
4
+ data.tar.gz: ca5cc298e9277e80c080d743045f6ff469b50d0ba54ed6c0183d5905f7b10b0e
5
5
  SHA512:
6
- metadata.gz: 4f2999ad4d947a2f3623d4dfa82aa6f9a31daabef750715bc2d4671dae7f64e3dee7076e26dd6e678b4e1ecc394ea96f4a37f241fc258eea53f533e7040a1216
7
- data.tar.gz: 825f4065b65081552b68d6228c5c7d72e96d60cc6967e1789485df31366aa9f6ce5e09c2508604e697180ef7ccd7b9c5e5b75bc94ee9c954cb7dce091c885a5d
6
+ metadata.gz: 315a63864050c7dacfe06ac17dfd098bfb4d698490cb214a9293b7446b6f35061dfa1e5919b63ce1684588977ecb1258ad07d8e7d4c056b61cb457de0ac13ec2
7
+ data.tar.gz: 910d703ac1b4c71a4f0ae00666ea16511578c7a39f31b56348bdd34069aa82d0c07978db26d7586c3b3a545f0aa2fa242bedd8ee25d7a02ca4baff2756537162
@@ -28,6 +28,9 @@ module Effective
28
28
  attr_accessor :send_mark_as_paid_email_to_buyer # Set by Admin::Orders#mark_as_paid
29
29
  attr_accessor :skip_buyer_validations # Set by Admin::Orders#create
30
30
 
31
+ # If we want to use orders in a has_many way
32
+ belongs_to :parent, polymorphic: true, optional: true
33
+
31
34
  belongs_to :user, validate: false # This is the buyer/user of the order. We validate it below.
32
35
  has_many :order_items, -> { order(:id) }, inverse_of: :order, class_name: 'Effective::OrderItem', dependent: :delete_all
33
36
 
@@ -2,6 +2,10 @@ class CreateEffectiveOrders < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  create_table <%= @orders_table_name %> do |t|
4
4
  t.integer :user_id
5
+
6
+ t.integer :parent_id
7
+ t.string :parent_type
8
+
5
9
  t.string :state
6
10
  t.datetime :purchased_at
7
11
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '4.4.10'.freeze
2
+ VERSION = '4.5.0'.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: 4.4.10
4
+ version: 4.5.0
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-06-22 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails