Displaying 1 result from an estimated 1 matches for "updated_ondoesn".
2005 Dec 22
3
help with unless
...lookup = Profit.find(:all, :conditions => [ "user_id = ? AND
product_id = ?", uid, pid])
unless lookup.empty?
if (lookup.updated_on > 360.minutes.ago)
return
end
end
If lookup is empty, then I get an error message that
lookup.updated_ondoesn''t exist. I''ve tried
lookup.nil? but lookup gets returned in the form of [] so that empty works.
But if lookup is empty should not the code inside the statement get ignored?
Any suggestions on how I might rework that code?
Thanks
Steve Odom
http://www.smarkets.net
_____________...