I'm getting an error that happens for one model and not the other. I can run Job.all.within(5, :origin => [0, 0])
, but not User.all.within(5, :origin => [0, 0])
, even though they have the same info in their models: acts_as_mappable lng_column_name: :longitude, lat_column_name: :latitude
For the broken case, it seems to be breaking here (this is code from the Geokit gem):
def within(distance, options = {})
options[:within] = distance
#geo_scope(options)
where(distance_conditions(options)) # HERE
end
Where, if I interrupt, I can output:
>> options
=> {:within=>5}
>> distance_conditions(options)
!! #<TypeError: no implicit conversion of Symbol into Integer>
What's going on?