CachedSupermodel 0.1.2.8 → 0.1.2.9

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.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/cs_active_record.rb +6 -2
  3. 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.8') do |p|
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'
@@ -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
- where << a + ' = ?'
85
- params << args[i]
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.8
7
- date: 2007-08-23 00:00:00 +02:00
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