wco_models 3.1.0.312 → 3.1.0.313

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: b4c36c9a95197b089d3a733fbdb9cb20160205d64a86a86ebd19114e667bdc5d
4
- data.tar.gz: a6f9f64d6768de1debc1850885951a3640413c2999f2c64e391db015a9b9b11a
3
+ metadata.gz: c622a73c401d1bb78a1ce1ffe72ae4923d2fa3d452d6011e5ad5968345e66300
4
+ data.tar.gz: f09b8bf4a8ccc5974979e9c399108b83b6d2f69ca9a8214cb9b026cb10b373b2
5
5
  SHA512:
6
- metadata.gz: a0646fa441c8d26c3338fc51816401fe0ccc591e428f25c3429befabe1860915baba33a86e1835c95baf925b62a1a318228cd9c980c773f968b9d01d7ba51ae8
7
- data.tar.gz: '09f82b2e7b79093b15c259976a9af9da76d20ad356775cbc91bc5431dacd5b6bad1cf78b765df3a8d26ca591448bb5074d1b8c80462d1f22180d2a204184068e'
6
+ metadata.gz: 213f70b468caee15cd916d996778954a8f8471a6c4feb0854fdc8d7d2d79d931629573d6c4b38b057309065fa769c38764240097fbda173d5b514917d56da037
7
+ data.tar.gz: b416d7abe72e3dc78e429cd570a0d5a358942879680f5d6094c9d2c26651a52dff3d9755df8d9b009e6c2b38b2aae7d952bbaaa765d7fbc203c05871a9535ceb
@@ -20,13 +20,17 @@ class Wco::LeadsetsController < Wco::ApplicationController
20
20
  end
21
21
 
22
22
  def destroy
23
- leadsets = Leadset.find( params[:leadset_ids] )
23
+ authorize! :create, Wco::Leadset
24
+ leadsets = Wco::Leadset.find( params[:leadset_ids] ) rescue []
24
25
  @results = []
25
26
  leadsets.each do |leadset|
26
- @results.push leadset.discard
27
+ @results.push leadset.destroy
27
28
  end
28
- flash[:notice] = "Discard outcome: #{@results.inspect}."
29
- redirect_to action: 'index'
29
+ if params[:id]
30
+ @results.push Wco::Leadset.find(params[:id]).destroy
31
+ end
32
+ flash[:notice] = "destroy outcome: #{@results.inspect}."
33
+ redirect_to request.referrer || { action: 'index' }
30
34
  end
31
35
 
32
36
  def edit
@@ -9,7 +9,7 @@
9
9
  .a.mr-2= button_tag 'Delete', method: :delete, class: 'delete-btn'
10
10
  = render 'wco/tags/actions', resource: 'Wco::Leadset'
11
11
 
12
- .float-right= render '/wco/search', path: leadsets_path
12
+ = render '/wco/search', path: leadsets_path
13
13
  = paginate @leadsets, :param_name => :leadsets_page, :views_prefix => 'wco'
14
14
  %table.bordered
15
15
  %thead
@@ -30,6 +30,7 @@
30
30
  %td
31
31
  = link_to '[~]', edit_leadset_path( leadset )
32
32
  = link_to leadset.company_url, leadset_path(leadset)
33
+ .d-inline-block= button_to 'x', leadset_path(leadset), method: :delete, data: { confirm: 'Are you sure?' }
33
34
 
34
35
  %td.tags
35
36
  = render '/wco/tags/index_chips', tags: leadset.tags
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.312
4
+ version: 3.1.0.313
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-07 00:00:00.000000000 Z
11
+ date: 2026-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3