effective_datatables 3.7.5 → 3.7.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffda731c223c88524c9b86916f9a699cd23a388538b18a9687229a054bdb8ec9
4
- data.tar.gz: 7580eb3b4b06a7d36b5ba2ddfa92d159c9cb42d5a5240cc811453d037a12d3dc
3
+ metadata.gz: 5447344cbeb4009c6eebd58b3ac8e32abcba744721a4f46153c37da2f8cd31e8
4
+ data.tar.gz: 6d9038d2d14bd9ca31feea1510ba49c44123107bad931396ed47632d3aa4c001
5
5
  SHA512:
6
- metadata.gz: 2d07acd93b0557e28e24363ec4d68bd46d6c19f67544acfa8e66dcccadc5e4510199cfc2be3a9f89f1ddbadcd537518983f2a6b08994733ec83997e10ba1b524
7
- data.tar.gz: a71389bfb336ecf7e7030383061438895c4af0f14f55d6f89f6bc8182adab7580d42e65fa319ea730f7262c8812fae4cc2ec954886c2769def6348d3d95ad8fc
6
+ metadata.gz: eee207a58d6ae1197830df69f75aa7f9adfdbfb913e7fa14357e10e3cebe0e47c68fccd803facf486e2d302d5108cbb4edf46210bad01436962dbe38c36a7ef6
7
+ data.tar.gz: 82dcfe1f94fcbbad17fe7d9d82f4301e2d3b8d7c4b3a8101afc657f90bec08da99fd40e729f33ee8ff051b99bb379dae7bdf909213be34fe36075e0d85cbfd96
@@ -176,15 +176,15 @@ module EffectiveDatatablesPrivateHelper
176
176
  collection = opts[:collection]
177
177
  input_html = opts[:input_html] || {}
178
178
 
179
- form.input name,
179
+ attributes = {
180
180
  value: value,
181
181
  selected: value,
182
182
  as: as,
183
183
  collection: collection,
184
184
  label: opts[:label],
185
- required: input_html.delete(:required),
186
- multiple: input_html.delete(:multiple),
187
- include_blank: input_html.delete(:include_blank),
185
+ required: input_html.delete(:required) || opts[:required],
186
+ multiple: input_html.delete(:multiple) || opts[:multiple],
187
+ include_blank: input_html.delete(:include_blank) || opts[:include_blank],
188
188
  group_method: input_html.delete(:group_method),
189
189
  group_label_method: input_html.delete(:group_label_method),
190
190
  value_method: input_html.delete(:value_method),
@@ -192,6 +192,9 @@ module EffectiveDatatablesPrivateHelper
192
192
  input_html: (({name: ''} unless datatable._filters_form_required?) || {}).merge(input_html),
193
193
  input_js: ({ placeholder: ''} if as == :effective_select),
194
194
  wrapper_html: {class: 'form-group-sm'}
195
+ }.compact
196
+
197
+ form.input name, **attributes
195
198
  end
196
199
 
197
200
  def datatable_scope_tag(form, datatable, opts = {})
@@ -94,10 +94,10 @@ module Effective
94
94
 
95
95
  case column[:as]
96
96
  when :boolean
97
- if fuzzy
98
- term ? (obj == true) : (obj != true)
97
+ if term
98
+ ['Yes', 'yes', true, 'true', '1'].include?(value)
99
99
  else
100
- obj == term
100
+ ['No', 'no', false, 'false', '0'].include?(value)
101
101
  end
102
102
  when :datetime, :date
103
103
  end_at = (
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '3.7.5'.freeze
2
+ VERSION = '3.7.6'.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.7.5
4
+ version: 3.7.6
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: 2019-12-04 00:00:00.000000000 Z
11
+ date: 2020-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails