wco_models 3.1.0.45 → 3.1.0.46
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/wco/lead.rb +1 -1
- data/app/models/wco/video.rb +8 -8
- data/app/models/wco_email/context.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a5d5670d27e5ffe31a148d7c746b5da9ab488cbe69dc6858d3ea5dd30bba67a
|
4
|
+
data.tar.gz: 301c1ed8eab2e77f157a5b7560dbfcb6d2e23b45b6dc64b469b5de2c0d75e5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 254d577ba591a0fa571637f7530608cee0993ec36095669e4eae89d672c463ee53c30a4e9d03333b456aef8b267d91edd348ccbac7695db05c681d157dc140e8
|
7
|
+
data.tar.gz: b4ac32502cf0456b89281681a704dc9bbc91fc92807b7f5c5844acbdfc2f3f7b5a0d8f0901670c260adf174c6e8ed7e6d161f758b3b18dcbd5c161c4fd401955
|
data/app/models/wco/lead.rb
CHANGED
data/app/models/wco/video.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
|
2
|
+
require 'mongoid_paperclip'
|
3
|
+
|
2
4
|
class Wco::Video
|
3
5
|
include Mongoid::Document
|
4
6
|
include Mongoid::Timestamps
|
@@ -12,7 +14,6 @@ class Wco::Video
|
|
12
14
|
field :subhead ## still need it... 2023-03-24
|
13
15
|
|
14
16
|
field :is_public, :type => Boolean, :default => false
|
15
|
-
|
16
17
|
def published
|
17
18
|
where({ :is_public => true }).order_by({ :created_at => :desc })
|
18
19
|
end
|
@@ -28,13 +29,6 @@ class Wco::Video
|
|
28
29
|
# belongs_to :user_profile, :class_name => 'Ish::UserProfile', :inverse_of => :videos
|
29
30
|
# has_and_belongs_to_many :shared_profiles, :class_name => 'Ish::UserProfile', :inverse_of => :shared_videos
|
30
31
|
|
31
|
-
|
32
|
-
def self.list
|
33
|
-
[['', nil]] + self.unscoped.order_by( :created_at => :desc ).map do |item|
|
34
|
-
[ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ]
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
32
|
has_mongoid_attached_file :video,
|
39
33
|
# styles: { :thumb => { geometry: '192x108', format: 'jpeg' }, },
|
40
34
|
# processors: [ :transcoder ],
|
@@ -69,4 +63,10 @@ class Wco::Video
|
|
69
63
|
%w| name descr |
|
70
64
|
end
|
71
65
|
|
66
|
+
def self.list
|
67
|
+
[['', nil]] + self.unscoped.order_by( :created_at => :desc ).map do |item|
|
68
|
+
[ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ]
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
72
|
end
|
@@ -45,8 +45,6 @@ class WcoEmail::Context
|
|
45
45
|
self[:subject].presence || tmpl.subject
|
46
46
|
end
|
47
47
|
|
48
|
-
has_and_belongs_to_many :leads, class_name: 'Wco::Lead'
|
49
|
-
|
50
48
|
belongs_to :email_template, class_name: 'WcoEmail::EmailTemplate'
|
51
49
|
def tmpl; email_template; end
|
52
50
|
|
@@ -76,6 +74,9 @@ class WcoEmail::Context
|
|
76
74
|
|
77
75
|
|
78
76
|
belongs_to :lead, class_name: 'Wco::Lead'
|
77
|
+
def to_email
|
78
|
+
lead.email
|
79
|
+
end
|
79
80
|
|
80
81
|
field :cc, type: :string
|
81
82
|
field :ccs, type: :array, default: []
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.
|
4
|
+
version: 3.1.0.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|