seamusabshere-cache-money 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cash/finders.rb +1 -1
- data/lib/cash/query/primary_key.rb +3 -1
- metadata +1 -1
data/lib/cash/finders.rb
CHANGED
@@ -14,7 +14,9 @@ module Cash
|
|
14
14
|
return [] if @expects_array && @ids.empty?
|
15
15
|
raise ActiveRecord::RecordNotFound if @ids.empty?
|
16
16
|
|
17
|
-
super(:conditions => { :id => @ids.first })
|
17
|
+
retval = super(:conditions => { :id => @ids.first })
|
18
|
+
retval = nil if retval.kind_of?(Array) and retval.empty? and !@expects_array
|
19
|
+
retval
|
18
20
|
end
|
19
21
|
|
20
22
|
protected
|