Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## user.rb
- class User < ActiveRecord::Base
- define_index do
- # ...
- has geocoding.geocode(:id), :as => :geocode_id
- has 'RADIANS(geocodes.latitude)', :as => :latitude, :type => :float
- has 'RADIANS(geocodes.longitude)', :as => :longitude, :type => :float
- end
- end
Add Comment
Please, Sign In to add comment