wco_models 3.1.0.81 → 3.1.0.82
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: cd7385bbbad06fcc84a31720f2f549a80703b2740d2031115b2479579c47a1d3
|
|
4
|
+
data.tar.gz: 6c19ad0bc735c05ebd457870aff9ca5e6b9368dbabd71cab789aa2bbadc8a06b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f94c696a9048b71fa7497ec41033d74515d7136dbf342fa1c5c61c1430ef26c9ca4bad59b66b825a3ec3e11de3865a552ee0702c063bcde7aa40950dd6e7ead9
|
|
7
|
+
data.tar.gz: 9701df840501d675f1a6607fbb97dc7a7c0536052f490b29c902eee1e21f8f9fd038ec13bb7a2b7a28c90862cfd0170b083214997a7104fc53ba75d072f5e83b
|
|
@@ -7,6 +7,8 @@ class Wco::GalleriesController < Wco::ApplicationController
|
|
|
7
7
|
# Alphabetized! : )
|
|
8
8
|
|
|
9
9
|
def create
|
|
10
|
+
params[:gallery][:tag_ids]&.delete ''
|
|
11
|
+
|
|
10
12
|
# params[:gallery][:shared_profiles] ||= []
|
|
11
13
|
# params[:gallery][:shared_profiles].delete('')
|
|
12
14
|
# params[:gallery][:shared_profiles] = Wco::Profile.find params[:gallery][:shared_profiles]
|
|
@@ -99,6 +101,7 @@ class Wco::GalleriesController < Wco::ApplicationController
|
|
|
99
101
|
end
|
|
100
102
|
|
|
101
103
|
def update
|
|
104
|
+
params[:gallery][:tag_ids]&.delete ''
|
|
102
105
|
authorize! :update, @gallery
|
|
103
106
|
|
|
104
107
|
old_shared_profile_ids = @gallery.shared_profiles.map(&:id)
|
|
@@ -4,7 +4,7 @@ class Wco::ReportsController < Wco::ApplicationController
|
|
|
4
4
|
before_action :set_lists
|
|
5
5
|
|
|
6
6
|
def create
|
|
7
|
-
params[:report][:tag_ids]
|
|
7
|
+
params[:report][:tag_ids]&.delete ''
|
|
8
8
|
|
|
9
9
|
@report = Wco::Report.new params[:report].permit!
|
|
10
10
|
authorize! :create, @report
|
|
@@ -51,7 +51,7 @@ class Wco::ReportsController < Wco::ApplicationController
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
def update
|
|
54
|
-
params[:report][:tag_ids]
|
|
54
|
+
params[:report][:tag_ids]&.delete ''
|
|
55
55
|
|
|
56
56
|
@report = Wco::Report.unscoped.find params[:id]
|
|
57
57
|
authorize! :update, @report
|
data/app/models/wco/report.rb
CHANGED
|
@@ -14,6 +14,7 @@ class Wco::Report
|
|
|
14
14
|
field :title
|
|
15
15
|
validates :title, presence: true, uniqueness: true
|
|
16
16
|
index({ title: 1 }, { unique: true })
|
|
17
|
+
def name ; title ; end
|
|
17
18
|
|
|
18
19
|
field :subtitle
|
|
19
20
|
|
|
@@ -39,10 +40,6 @@ class Wco::Report
|
|
|
39
40
|
|
|
40
41
|
# has_one :photo
|
|
41
42
|
|
|
42
|
-
def export_fields
|
|
43
|
-
%w| name descr |
|
|
44
|
-
end
|
|
45
|
-
|
|
46
43
|
has_and_belongs_to_many :tags
|
|
47
44
|
|
|
48
45
|
end
|
data/app/models/wco/utils.rb
CHANGED
|
@@ -105,7 +105,11 @@ class WcoEmail::Message
|
|
|
105
105
|
})
|
|
106
106
|
|
|
107
107
|
when WcoEmail::EmailFilter::KIND_AUTORESPOND_EACT
|
|
108
|
-
|
|
108
|
+
##
|
|
109
|
+
## This error is normal:
|
|
110
|
+
## Mongoid::Errors::Validations `Email action template is already taken`
|
|
111
|
+
##
|
|
112
|
+
out = Sch.create({
|
|
109
113
|
email_action_template: filter.email_action_template,
|
|
110
114
|
status: Sch::STATUS_ACTIVE,
|
|
111
115
|
lead_id: lead.id,
|