effective_classifieds 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3800f94dc914a5451621ba31e2a791ceb1bfb0be11ccb27cfab08161368a84ab
|
|
4
|
+
data.tar.gz: d16ab09d94918e0a5133127bfcd6f62366081baf46918894a69369b45ca52b1b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bba4c7426535e984578c7649d026d757f1c49a7599020935449dd5d2f68aeec745b1e795b246a48e63b03156ef55eeff351d055940ceee27180f1320bd518890
|
|
7
|
+
data.tar.gz: 7f65ddfe36db6731bdc1d21e001a107ec7fd52d204a3c0c71f29bbea109e7d01719a57d0527b154ce7fdb2af5a1a1dda6a4b37fb9372b2576b84fec271c18cba
|
|
@@ -140,8 +140,8 @@ module Effective
|
|
|
140
140
|
def published?
|
|
141
141
|
return false unless approved?
|
|
142
142
|
return false if archived?
|
|
143
|
-
return false if start_on.blank? || (Time.zone.now < start_on)
|
|
144
|
-
return false if end_on.present? && (Time.zone.now >= end_on)
|
|
143
|
+
return false if start_on.blank? || (Time.zone.now.to_date < start_on)
|
|
144
|
+
return false if end_on.present? && (Time.zone.now.to_date >= end_on)
|
|
145
145
|
true
|
|
146
146
|
end
|
|
147
147
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
%hr
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- unless @classified.approved?
|
|
16
16
|
%p= link_to('Approve Classified Ad', effective_classifieds.edit_admin_classified_path(@classified))
|
|
17
17
|
|
|
18
18
|
%p= link_to('View Classified Ad', effective_classifieds.classified_path(@classified))
|
|
@@ -24,22 +24,4 @@ module EffectiveClassifieds
|
|
|
24
24
|
mailer&.constantize || Effective::ClassifiedsMailer
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
def self.parent_mailer_class
|
|
28
|
-
return parent_mailer.constantize if parent_mailer.present?
|
|
29
|
-
ActionMailer::Base
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def self.send_email(email, *args)
|
|
33
|
-
raise('expected args to be an Array') unless args.kind_of?(Array)
|
|
34
|
-
|
|
35
|
-
if defined?(Tenant)
|
|
36
|
-
tenant = Tenant.current || raise('expected a current tenant')
|
|
37
|
-
args.last.kind_of?(Hash) ? args.last.merge!(tenant: tenant) : args << { tenant: tenant }
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
deliver_method = EffectiveClassifieds.deliver_method || EffectiveResources.deliver_method
|
|
41
|
-
|
|
42
|
-
EffectiveClassifieds.mailer_class.send(email, *args).send(deliver_method)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
27
|
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.2.
|
|
4
|
+
version: 0.2.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-03-
|
|
11
|
+
date: 2022-03-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|