effective_datatables 4.7.7 → 4.7.8

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: ee156f06d9f35299e3e4cba5f45fa4525e2d74272d3e937061b13509b972d77e
4
- data.tar.gz: 98ee4e7f35efd7fe6132ab3cbee74cff4f8bfc302a52c2b2b6494515839f215e
3
+ metadata.gz: e1ffaca2f3188d2d0e191f663bda92dc3abf1689dc10d75a86e6685429b10ee6
4
+ data.tar.gz: d72d0f4a1f13b1bd53e5976a127dfc141e3b06d1044c0968569297d7fce47a45
5
5
  SHA512:
6
- metadata.gz: 5233cce6528fca4f2a67852861b60c3618c4ca02d6e3f4f7317360719642e242e1d4345b7cfa29aaeb46dcdc2a05c9d00d38b363c9c2b12bcbe0435d1dac3cf3
7
- data.tar.gz: d24aae4ceab7c2f86200b9a160920cad475017bba99289139b4f6ffd230f1a3f3c0da988fafd74055179b2f6ee517bb978ae8aa7d963e152c08c1603dfdb6e47
6
+ metadata.gz: 6636d69ef21c9043e53223fc978426652c1f026fb1ba68785db8abf26d6646f1d1fdffd4d5a97845f11b91a77661f781891367f232f60b7a9453a60482887a9f
7
+ data.tar.gz: 1bdd69edde3a0123cefae1d370f04572e7cd509fee702d6f449d2188cad41f04bcf7e3b714452d75a543b26ba89603ef6850b66800266d64f6b5ddaa05443448
@@ -169,7 +169,8 @@ module Effective
169
169
  search[:value] ||= search.delete(:selected) if search.key?(:selected)
170
170
 
171
171
  # Merge with defaults
172
- search_resource = (opts[:resource] || effective_resource || fallback_effective_resource)
172
+ search_resource = [opts[:resource], effective_resource, fallback_effective_resource].compact
173
+ search_resource = search_resource.find { |res| res.klass.present? } || search_resource.first
173
174
 
174
175
  if array_collection? && opts[:resource].present?
175
176
  search.reverse_merge!(search_resource.search_form_field(name, collection.first[opts[:index]]))
@@ -8,4 +8,4 @@
8
8
  - elsif show_action && EffectiveDatatables.authorized?(controller, :show, resource) && (path = effective_resource.action_path(:show, resource)).present?
9
9
  = link_to resource_to_s, path, title: resource_to_s
10
10
  - else
11
- = resource_to_s.html_safe
11
+ = resource_to_s.to_s.html_safe
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.7.7'.freeze
2
+ VERSION = '4.7.8'.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: 4.7.7
4
+ version: 4.7.8
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-07-02 00:00:00.000000000 Z
11
+ date: 2019-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails