activerecord_cache 0.0.3 → 0.0.4

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.
@@ -12,7 +12,7 @@ module ActiveRecordCache
12
12
  private
13
13
 
14
14
  def find_target_with_caching
15
- if klass.use_activerecord_cache && reflection.foreign_key == klass.primary_key
15
+ if klass.use_activerecord_cache && reflection.options[:primary_key].nil?
16
16
  klass.find_through_cache(owner[reflection.foreign_key]).tap { |record| set_inverse_instance(record) }
17
17
  else
18
18
  find_target_without_caching
@@ -2,7 +2,7 @@ module ActiveRecordCache
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 3
5
+ TINY = 4
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-17 00:00:00.000000000Z
12
+ date: 2012-03-01 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2165983820 !ruby/object:Gem::Requirement
16
+ requirement: &2166940320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 3.1.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2165983820
24
+ version_requirements: *2166940320
25
25
  description: Caches ActiveRecord models for simple finds using the Rails low-level
26
26
  cache
27
27
  email: