effective_classifieds 0.6.6 → 0.6.7
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: dcb913b24db42f767a00e6510007f7cbdd4a23f41cc12250418a7e81328746f9
|
4
|
+
data.tar.gz: 604f561f584ec2199be9641ba9d7a9616f3a496c147c85e3eaa101451265f265
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a05e61dba76290ffeac816e406e72cecf48998311b633c1deb64dcef168ee1e03521725a64c79d8ec3609aec98e1b279c116680bbfcdfac0b1618018c3ac570
|
7
|
+
data.tar.gz: f7c42880255906ef28717bf3cbf93cf4f2e8a66bb9b3396e3052826828543523ff4145bec96e2851617b5a198e2f070d041b37cb42e3c54cbbfca95dd38e98ce
|
@@ -135,10 +135,14 @@ module Effective
|
|
135
135
|
self.errors.add(:end_on, 'must be after start date') if end_on < start_on
|
136
136
|
end
|
137
137
|
|
138
|
+
def end_on_distance
|
139
|
+
date = Time.zone.now
|
140
|
+
ApplicationController.helpers.distance_of_time_in_words(date + EffectiveClassifieds.max_duration, date).gsub('about', '').strip
|
141
|
+
end
|
142
|
+
|
138
143
|
validate(if: -> { start_on.present? && end_on.present? && EffectiveClassifieds.max_duration.present? && !importing }) do
|
139
144
|
if (end_on - start_on) > EffectiveClassifieds.max_duration
|
140
|
-
|
141
|
-
self.errors.add(:end_on, "must be within #{distance} of start date")
|
145
|
+
self.errors.add(:end_on, "must be within #{end_on_distance} of start date")
|
142
146
|
end
|
143
147
|
end
|
144
148
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
= f.date_field :start_on, label: "Start", hint: 'The posting will be displayed starting after this date.'
|
18
18
|
|
19
19
|
.col-lg-6
|
20
|
-
= f.date_field :end_on, label: "Expire", hint:
|
20
|
+
= f.date_field :end_on, label: "Expire", hint: "The posting will no longer be displayed after this date. Please enter a date within #{f.object.end_on_distance} of start date"
|
21
21
|
|
22
22
|
- if f.object.persisted? && !f.object.draft?
|
23
23
|
= f.check_box :archived, label: 'Yes, this posting is archived. It will not be displayed.'
|
@@ -22,7 +22,7 @@ EffectiveClassifieds.setup do |config|
|
|
22
22
|
config.auto_approve = false
|
23
23
|
|
24
24
|
# Can checkout with phone or cheque 'deferred' payment providers
|
25
|
-
config.skip_deferred =
|
25
|
+
config.skip_deferred = true
|
26
26
|
|
27
27
|
# Mailer Settings
|
28
28
|
# Please see config/initializers/effective_resources.rb for default effective_* gem mailer settings
|
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.6.
|
4
|
+
version: 0.6.7
|
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-
|
11
|
+
date: 2024-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: effective_email_templates
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: effective_test_bot
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|