mongoid_cached_document 0.1.2 → 0.1.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.
- data/VERSION +1 -1
- data/lib/mongoid/cached_document.rb +1 -2
- data/mongoid_cached_document.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -59,7 +59,7 @@ module Mongoid
|
|
59
59
|
def method_missing(name, *args, &block)
|
60
60
|
if @document
|
61
61
|
_document.send name, *args, &block
|
62
|
-
elsif @cached_attributes && @cached_attributes.has_key?
|
62
|
+
elsif @cached_attributes && @cached_attributes.has_key?(name.to_s)
|
63
63
|
@cached_attributes[name.to_s]
|
64
64
|
elsif _document
|
65
65
|
if defined? Rails
|
@@ -75,7 +75,6 @@ module Mongoid
|
|
75
75
|
private
|
76
76
|
def _document
|
77
77
|
@document ||= @cached_attributes && @cached_attributes['_type'].constantize.find(@cached_attributes['_id'])
|
78
|
-
end
|
79
78
|
end
|
80
79
|
end
|
81
80
|
end
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mongoid_cached_document}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Matthew Gibbons"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-09}
|
13
13
|
s.description = %q{Adds support for caching Mongoid documents as a field within other Mongoid documents, with complete control over which fields to cache.}
|
14
14
|
s.email = %q{mhgibbons@me.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Matthew Gibbons
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-09 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|