effective_classifieds 0.4.3 → 0.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3610f8cb04cfd110fbcdae4c20891c456bf8634ed3f7a9acebfd740a20056f06
|
4
|
+
data.tar.gz: fb3dc4d6373143bbb5df800b632c96990d45ff46d7dad78058fdfc78cffa767f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '00780eb893c3051744a5fa5f0fa92cf97fd0afc513ce30442988726e4fa04366f2f043dcd19479cf7fb45d0bf115b12ca95c662a0300ac1310df1d224e43335d'
|
7
|
+
data.tar.gz: 18ba35c92f0efe5fc40c715ff6c14e3d84dfa2ce88af2908e983161ec16e1abd5cb15aa06aa7b751c95dd17aadfdcd1e5d008af836519ef392ef958b65891c31
|
@@ -5,6 +5,7 @@ module Effective
|
|
5
5
|
self.table_name = EffectiveClassifieds.classifieds_table_name.to_s
|
6
6
|
|
7
7
|
attr_accessor :current_user
|
8
|
+
attr_accessor :importing
|
8
9
|
|
9
10
|
acts_as_slugged
|
10
11
|
acts_as_purchasable
|
@@ -118,11 +119,13 @@ module Effective
|
|
118
119
|
|
119
120
|
validates :start_on, presence: true
|
120
121
|
validates :end_on, presence: true
|
121
|
-
validates :location, presence: true
|
122
122
|
|
123
|
-
|
124
|
-
|
125
|
-
|
123
|
+
with_options(unless: -> { importing }) do
|
124
|
+
validates :location, presence: true
|
125
|
+
validates :organization, presence: true
|
126
|
+
validates :email, presence: true
|
127
|
+
validates :phone, presence: true
|
128
|
+
end
|
126
129
|
|
127
130
|
validate(if: -> { start_on.present? && end_on.present? }) do
|
128
131
|
self.errors.add(:end_on, 'must be after start date') if end_on < start_on
|
@@ -10,13 +10,13 @@
|
|
10
10
|
|
11
11
|
.row
|
12
12
|
.col-lg-6
|
13
|
-
|
14
|
-
hint: 'The posting will be displayed starting after this date.',
|
15
|
-
|
13
|
+
- if f.object.new_record?
|
14
|
+
= f.date_field :start_on, label: "Start", hint: 'The posting will be displayed starting after this date.', input_js: { minDate: minDate.strftime('%F') }
|
15
|
+
- else
|
16
|
+
= f.date_field :start_on, label: "Start", hint: 'The posting will be displayed starting after this date.'
|
16
17
|
|
17
18
|
.col-lg-6
|
18
|
-
= f.date_field :end_on, label: "Expire",
|
19
|
-
hint: 'The posting will no longer be displayed after this date.'
|
19
|
+
= f.date_field :end_on, label: "Expire", hint: 'The posting will no longer be displayed after this date.'
|
20
20
|
|
21
21
|
- if f.object.persisted? && !f.object.draft?
|
22
22
|
= f.check_box :archived, label: 'Yes, this posting is archived. It will not be displayed.'
|
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.4.
|
4
|
+
version: 0.4.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-11-
|
11
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|