forest_liana 1.3.31 → 1.3.32

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
  SHA1:
3
- metadata.gz: fb7642e951526bdd1819bf1ec68fb85ab243ad8a
4
- data.tar.gz: 3cbbd8fb7265745957e7d02fa1e4e5cc752c31c3
3
+ metadata.gz: 114ffafc36fa1a865ab38df0933f712dc145f592
4
+ data.tar.gz: 8682f89e467aa0674c74405f1cedad9645c7b961
5
5
  SHA512:
6
- metadata.gz: 4793446cd4d3a799c90371d86d3a0795ca01b5b6906410435c7000ad0129e17942396d54d6e48aee8f1db4accc83cb2b98cf05012d1a24d954891fcd3d6ed274
7
- data.tar.gz: 0e8a2ed2464b7726e4c65e2a0b45ab0f606080be95243b196a5fcba63ea240d8f6ddeaf2ee1ff9310e63698bc5ed1b55850b4a84b7ffaa3b772fb453f0266037
6
+ metadata.gz: 988750eb9cb5855a687ce295bcf44fbbdaac7a0dfd15715ea99ab85c7eba152c93273f7946f51a22353c1513a40e70fc84cf3dcea829f7a5ef364b68335df2da
7
+ data.tar.gz: d49507c2646150d78f0b5b0a5290df90f42062a4891807b9a432ed0a2073e3d7f568994b303eafbd9127433e6337b912fd29d54eb5afce885df46666a05c583d
@@ -35,7 +35,16 @@ module ForestLiana
35
35
  association = @resource.reflect_on_association(name.try(:to_sym))
36
36
 
37
37
  if [:has_one, :belongs_to].include?(association.try(:macro))
38
- if data.is_a?(Hash) && data[:id]
38
+ # TODO: refactor like this?
39
+ #if data.blank?
40
+ #@attributes[name] = nil
41
+ #else
42
+ #@attributes[name] = association.klass.find(data[:id])
43
+ #end
44
+
45
+ # ActionController::Parameters do not inherit from Hash anymore
46
+ # since Rails 5.
47
+ if (data.is_a?(Hash) || data.is_a?(ActionController::Parameters)) && data[:id]
39
48
  @attributes[name] = association.klass.find(data[:id])
40
49
  elsif data.blank?
41
50
  @attributes[name] = nil
@@ -7,7 +7,6 @@ module ForestLiana
7
7
 
8
8
  def perform
9
9
  @records = @resource.unscoped.eager_load(includes)
10
- @records = @resource
11
10
  @records = search_query
12
11
  @records = sort_query
13
12
  end
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "1.3.31"
2
+ VERSION = "1.3.32"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.31
4
+ version: 1.3.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda