active_preview 0.1.5 → 0.1.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: fae3f57a09814a0c60abb7fd23e38046d0f70825f1d87e6c3e6545479c3f58c8
4
- data.tar.gz: c87448e91996b3c4a4281417f5b7c5a9277b5b323ccdb67e64e1ad62c29b7b15
3
+ metadata.gz: 2f4e8a04e3334d6b48dec986d860992d7a4b053667b15204cf43b3133d55b6dd
4
+ data.tar.gz: d6b4121710dda07c0c9534102da4eae900e9076cadb34172cf5319fbe834cb21
5
5
  SHA512:
6
- metadata.gz: 57d3e237ce7f66645fa9481cc8688014f552b39c8606f8c1e970485d86953506382a04ac695c5a85146928bd14da2ad3accb79f5225329c8ac513fd8d25a96dd
7
- data.tar.gz: 3e5035d889c074ea9714e67bd7caa1ea867641d506d3cf7d74020958377e2d7fe9d26c24ac067f2931e909d09b55be327ad639c755d23512e22b57a18380af59
6
+ metadata.gz: bc0e411560e6e4a1a124bfb23ca3403b1cd8e383af0d457945b3f769b757706ab2f361446b6101061ee317d945309a8309ef41e33e3a6ff3fcf7d9e9032ac4be
7
+ data.tar.gz: 25dd6dcb618ec3ed9d16cefbe70d5962279d6624591ea92e44d0b43a0f463ba49d00148933934b27d604f99ec2e4abfa8e453ca5ac8e57653fa187f7e56d0d1d
@@ -19,7 +19,10 @@ module AssociationHelper
19
19
  return parent if set.include? parent
20
20
  set.each do |a|
21
21
  next unless singular? a
22
- return a if association_class(klass: child_class, association: a)
22
+ if class_of_association(klass: child_class,
23
+ association: a) == parent_class
24
+ return a
25
+ end
23
26
  end
24
27
  end
25
28
 
@@ -1,3 +1,3 @@
1
1
  module ActivePreview
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Syd Young
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-07 00:00:00.000000000 Z
11
+ date: 2018-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails