cancan-eager_load 0.0.2 → 0.0.3

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
  SHA256:
3
- metadata.gz: 322e66e24a6cb570205bb168d8678822c171677c3707555cbd7804b88c4a06f4
4
- data.tar.gz: 505b51f3e13703169b9c69f106a4cab4e1b9eb9fb07a933ed12b5a5fc0460510
3
+ metadata.gz: 967d64d85d56a8fc439f0bcb66db99887847aef5de12c5bb4ef250942ce12717
4
+ data.tar.gz: a3dba4910c730ea0573a6d968ca14e836bdd24e212e66f56b52ec5cf069190db
5
5
  SHA512:
6
- metadata.gz: 16b01225d9c173864492e7ac92b177b67ab9b996ff8432fdc5fa05664c49f3c2fdaca73f0eeab1e5e3354eb9f7f9ec2ff0c5dec1a948883ba59b3c4506df059d
7
- data.tar.gz: 7fc9343396b863f0df453e989ca2788f71310339574444ebdbf9398ec88bd2ec25b8a3601938d6c498e6441d7eda43f2633bc2cb465e3e33f838cd5e064cff47
6
+ metadata.gz: 2f6905f204453d3e57bcfd4938e7434f19813c9bf304af993daff97c8286984ac6655dd9e8c00e70b769db73d9678404ddcf7527a82482a34c8247acab8b49cd
7
+ data.tar.gz: 45c31087af0c65c699d77d48b91cfb6e8d1649eeaed001c6241e3c5b6809eee38126780cb02849c4b12794816933cfb7cda21edf723de8d6a137681e959b1038
@@ -9,7 +9,7 @@ module CanCan
9
9
  return nested_subject_matches_conditions?(subject) if subject.class == Hash
10
10
 
11
11
  unless subject_class?(subject)
12
- subject.includes(conditions_to_includes(@conditions))
12
+ subject.includes(conditions_to_includes(@conditions)) if subject.is_a?(ActiveRecord::Base)
13
13
 
14
14
  return matches_conditions_hash?(subject)
15
15
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module CanCan
4
4
  module EagerLoad
5
- VERSION = '0.0.2'
5
+ VERSION = '0.0.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cancan-eager_load
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleck Greenham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-17 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-instance_includes