effective_datatables 3.2.3 → 3.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
  SHA1:
3
- metadata.gz: ce423e68860e1a5041f09dfe83ad7d096420ad7d
4
- data.tar.gz: e0435b2ba5857e9eb802ac9d6b844e469d155cda
3
+ metadata.gz: bff5ff06830aa75fddc8b3f258efb2bcf2172711
4
+ data.tar.gz: e8fb0ce5abfb5cda5f923e8129cbac8ffc66fdbe
5
5
  SHA512:
6
- metadata.gz: 3615d2e50397a588a76785d1465d9b2a278d0b8e4213eb4e44af1802ebf5ab93a2f61c5ad197c20493b2247464da898f8d38607ac3a6c50ea6cacda977b6ad0c
7
- data.tar.gz: c166d6ca5e5e594246d821755fc7242d395d81294f4f351e32a062a339f6650dc152b408165442e8f68138b7012fdb25d44cd931d89db7a04d1bd563d259e836
6
+ metadata.gz: 0f6fdd1eb126d275c1fd1d6b8f3cc94bb03bff1d46ccb61ae2f13b4c66fd159a859b306bc51d24897d579ecc155e9e85abaad18591a91380e374c5f40eea21c7
7
+ data.tar.gz: ff02255065aa756979a8389deec17c3a2e7f4778bae700fd21a8502eef4449795e98386836c68ef499a6e848dd8ad8f611fda3dbe43af80224a7d74a18250c2d
@@ -150,7 +150,7 @@ module Effective
150
150
  def apply_belongs_to_attributes!
151
151
  return unless active_record_collection?
152
152
 
153
- changed = attributes.any? do |attribute, value|
153
+ changed = attributes.select do |attribute, value|
154
154
  attribute = attribute.to_s
155
155
  next unless attribute.ends_with?('_id')
156
156
 
@@ -159,7 +159,7 @@ module Effective
159
159
 
160
160
  @_collection = @_collection.where(attribute => value)
161
161
  columns.delete(associated)
162
- end
162
+ end.present?
163
163
 
164
164
  load_columns! if changed
165
165
  end
@@ -8,4 +8,4 @@
8
8
 
9
9
  - if destroy_path
10
10
  - if destroy_action == true || (EffectiveDatatables.authorized?(controller, :destroy, resource) rescue false)
11
- = destroy_icon_to send(destroy_path, resource.to_param)
11
+ = destroy_icon_to send(destroy_path, resource.to_param), data: { method: :delete, confirm: "Delete #{resource}?" }
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '3.2.3'.freeze
2
+ VERSION = '3.2.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.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: 2017-09-20 00:00:00.000000000 Z
11
+ date: 2017-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails