CachedSupermodel 0.1.2.2 → 0.1.2.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/Rakefile +1 -1
- data/lib/cs_active_record.rb +6 -10
- metadata +3 -4
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rubygems'
|
|
4
4
|
require 'hoe'
|
5
5
|
require './lib/cached_supermodel.rb'
|
6
6
|
|
7
|
-
Hoe.new('CachedSupermodel', '0.1.2.
|
7
|
+
Hoe.new('CachedSupermodel', '0.1.2.3') do |p|
|
8
8
|
p.summary = 'A library that automatically caches all ActiveRecord::Base instances in memcache using the AdoccaMemcache gem.'
|
9
9
|
p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
|
10
10
|
p.author = 'adocca Entertainment AB'
|
data/lib/cs_active_record.rb
CHANGED
@@ -94,16 +94,12 @@ def self.#{finder}(*args)
|
|
94
94
|
method_missing(:#{finder}, *args)
|
95
95
|
else
|
96
96
|
rval = self.#{finder}_get_ids(*args)
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
rval.nil? ? nil : self.find(rval)
|
104
|
-
end
|
105
|
-
rescue ActiveRecord::RecordNotFound
|
106
|
-
nil
|
97
|
+
if Array === rval
|
98
|
+
rval.collect do |oid|
|
99
|
+
self.find(oid) rescue nil
|
100
|
+
end.compact
|
101
|
+
else
|
102
|
+
rval.nil? ? nil : (self.find(rval) rescue nil)
|
107
103
|
end
|
108
104
|
end
|
109
105
|
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.8.11
|
3
3
|
specification_version: 1
|
4
4
|
name: CachedSupermodel
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.2.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.1.2.3
|
7
|
+
date: 2007-02-14 00:00:00 +01:00
|
8
8
|
summary: A library that automatically caches all ActiveRecord::Base instances in memcache using the AdoccaMemcache gem.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,7 +25,6 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
-
post_install_message:
|
29
28
|
authors:
|
30
29
|
- adocca Entertainment AB
|
31
30
|
files:
|