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: 1225e5f8ee14fb9e0b74a9b203ee6d31867bfc649672b397feb577352e70e210
4
- data.tar.gz: 5b3ec3262738f2d7d5204152aa709d2074ae152d19626280ac9e08da0dd2c4fa
3
+ metadata.gz: cd7385bbbad06fcc84a31720f2f549a80703b2740d2031115b2479579c47a1d3
4
+ data.tar.gz: 6c19ad0bc735c05ebd457870aff9ca5e6b9368dbabd71cab789aa2bbadc8a06b
5
5
  SHA512:
6
- metadata.gz: 32b07eefa66c98d2634d18ee1d393371870bd91cee74d68c123878ea5f9d7e40d996ac01b90212b45cf7a68be55aa0782c719ca96057e24f51a12c8a9583f690
7
- data.tar.gz: 5ea6c008eb0090d52248094f436a8c2296d6084f882945c01f141efcf9185213ae1bca2f360a50d2cc6549cb463a0c792e72a518f5dcc8eb4305b4a91d9909db
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].delete ''
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].delete ''
54
+ params[:report][:tag_ids]&.delete ''
55
55
 
56
56
  @report = Wco::Report.unscoped.find params[:id]
57
57
  authorize! :update, @report
@@ -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
@@ -21,7 +21,7 @@ module Wco::Utils
21
21
 
22
22
  def set_slug
23
23
  return if !slug.blank?
24
- if name
24
+ if defined? name
25
25
  new_slug = name.downcase.gsub(/[^a-z0-9\s]/i, '').gsub(' ', '-')
26
26
  else
27
27
  new_slug = '1'
@@ -105,7 +105,11 @@ class WcoEmail::Message
105
105
  })
106
106
 
107
107
  when WcoEmail::EmailFilter::KIND_AUTORESPOND_EACT
108
- out = Sch.create!({
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,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.81
4
+ version: 3.1.0.82
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev