Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module ActsAsGeolocated
module ClassMethods
MILES_TO_METERS_FACTOR = 1609.344
def acts_as_geolocated(options = {})
if table_exists?
if ActiveRecord::Base.connection.data_source_exists?(table_name)
cattr_accessor :latitude_column, :longitude_column, :through_table, :distance_unit
self.latitude_column = options[:lat] || (column_names.include?("lat") ? "lat" : "latitude")
self.longitude_column = options[:lng] ||
Expand Down