查询Ruby Active记录对象

时间:2013-06-20 11:05:21

标签: ruby-on-rails

我的代码就是这个

users = UserLocation.find(:all, :conditions => "hide_my_location = 0 and datediff(now(), updated_at) < 2 and id != 196")
near_users = users.find(:all, :conditions => "substr(geohash, 1, 11) = 'abcdef'")
count = near_users.count

它在ruby 1.8.7中返回错误

错误的参数数量(2为1) Rails 2.3.6 ** activerecord(2.3.6)

0 个答案:

没有答案