effective_classifieds 0.7.0 → 0.8.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: e96a880538ec95e1745ec13e6ac7520f9de680e824068182247bde290794b6e4
4
- data.tar.gz: 18b832496e4a994383c2dced4291c60b7563b4f772b00dbb401e1a9a2f97e673
3
+ metadata.gz: 9fc07e4c951edd63780e49029746786add1983892bc513e9c5e74dec61355fae
4
+ data.tar.gz: 985b7ff1866e71415cca8f4d46ca9fcca8dde0073ecc21ecd1293d6eb70ca9e1
5
5
  SHA512:
6
- metadata.gz: cff4f5bd000f79a03f1342f0e030ca4459a5ed825d512e014547d8aa4cd8744f5aa577bca1c4ba430fa57795017db9d2f20469118e57ab8fd3141e2439f1a5ec
7
- data.tar.gz: 0ba27c2ed0d734c3bedf9e034c0f43e63c2f9d5619c071878e158b52510fd8079969ddcb0e3675cb1623ba6e698e48d10d2ce2b86efd6c0c2929df7718594ce5
6
+ metadata.gz: d9e5eea7dd4e285be7a81026fae9ef9e5376db94f18f713f3aa824f1463bbddb0cedcd1ba34176e735976c9542e80b419858a9a673b327e56ff408a2de7ea7d1
7
+ data.tar.gz: b90ca02dc0cb7e60c007d111a0e3c135ca17005fa9220c4f8cf786c1de182f009bf2743779585629d42be457b94c3b228f8634ac2d1e5ae4a2455ec2c955a932
@@ -39,10 +39,13 @@ module EffectiveClassifiedsClassifiedWizard
39
39
 
40
40
  log_changes(except: :wizard_steps) if respond_to?(:log_changes)
41
41
 
42
- # Application Namespace
42
+ # Application Namespace. This is who is checking out the classified wizard
43
43
  belongs_to :owner, polymorphic: true
44
44
  accepts_nested_attributes_for :owner
45
45
 
46
+ # Can be used for member-only pricing. The member.
47
+ belongs_to :user, polymorphic: true, optional: true
48
+
46
49
  # Effective Namespace
47
50
  has_many :classifieds, class_name: 'Effective::Classified', inverse_of: :classified_wizard, dependent: :destroy
48
51
  accepts_nested_attributes_for :classifieds, reject_if: :all_blank, allow_destroy: true
@@ -53,7 +56,7 @@ module EffectiveClassifiedsClassifiedWizard
53
56
  status_steps :text, permitted: false
54
57
 
55
58
  # Dates
56
- submitted_at :datetime
59
+ submitted_at :datetime, permitted: false
57
60
 
58
61
  # Pricing
59
62
  price_category :string
@@ -27,3 +27,15 @@
27
27
  %th Status
28
28
  %td
29
29
  %span.badge.badge-secondary= classified.status
30
+
31
+ - if classified_wizard.price_category.present?
32
+ %tr
33
+ %th Price Category
34
+ %td= classified_wizard.price_category
35
+
36
+ - if classified_wizard.user.present?
37
+ %tr
38
+ %th Member
39
+ %td
40
+ = classified_wizard.user
41
+ %small= masked_email(classified_wizard.user)
@@ -63,6 +63,8 @@ class CreateEffectiveClassifieds < ActiveRecord::Migration[6.0]
63
63
  t.datetime :submitted_at
64
64
 
65
65
  # Pricing
66
+ t.integer :user_id
67
+ t.string :user_type
66
68
  t.string :price_category
67
69
 
68
70
  t.datetime :updated_at
@@ -1,3 +1,3 @@
1
1
  module EffectiveClassifieds
2
- VERSION = '0.7.0'.freeze
2
+ VERSION = '0.8.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_classifieds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.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: 2024-06-27 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails