Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknow column distance #18

Open
rubian opened this issue Aug 23, 2011 · 1 comment
Open

Unknow column distance #18

rubian opened this issue Aug 23, 2011 · 1 comment

Comments

@rubian
Copy link

rubian commented Aug 23, 2011

acts_as_mappable :default_units => :miles,
:default_formula => :sphere,
:distance_field_name => :distance,
:lat_column_name => :o_lat,
:lng_column_name => :o_lng

@journeys = Journey.find(:all, :origin=>[g.lat,g.lng]:conditions => [all_conditions, arguments],:order=>'distance')

I am getting unknown column distance

@jbucki
Copy link

jbucki commented Oct 6, 2011

I was also running into this problem on Rails 3.0.10. Here's what worked for me:

WeatherStation.find(:all, :origin => self.address) # old/broken
WeatherStation.geo_scope(:origin => self.address) # new/working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants