我想在 Rails 中使用 Geokit 计算距离并使用within
子句。但是,当我在子句中输入列名时,出现以下错误:
NoMethodError:未定义的方法“to_f”:距离:符号
mobility_request = Mobility.within(:distance, :origin =>[self.location.latitude,self.location.longitude]).includes(:location)
如何正确使用 :distance 符号?
我想在 Rails 中使用 Geokit 计算距离并使用within
子句。但是,当我在子句中输入列名时,出现以下错误:
NoMethodError:未定义的方法“to_f”:距离:符号
mobility_request = Mobility.within(:distance, :origin =>[self.location.latitude,self.location.longitude]).includes(:location)
如何正确使用 :distance 符号?