CachedSupermodel 0.1.2.8 → 0.1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/cs_active_record.rb +6 -2
- metadata +2 -2
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.9') 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
@@ -81,8 +81,12 @@ def self.#{finder}_get_ids(*args)
|
|
81
81
|
query = 'SELECT ' + self.primary_key.to_s + ' from ' + self.table_name
|
82
82
|
where = []
|
83
83
|
attributes.each_with_index do |a, i|
|
84
|
-
|
85
|
-
|
84
|
+
if args[i].nil?
|
85
|
+
where << a + ' IS NULL'
|
86
|
+
else
|
87
|
+
where << a + ' = ?'
|
88
|
+
params << args[i]
|
89
|
+
end
|
86
90
|
end
|
87
91
|
|
88
92
|
query << (' WHERE ' + where.join(' AND '))
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
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.9
|
7
|
+
date: 2007-09-05 00:00:00 +02: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
|