Skip to content

Commit

Permalink
This shouldn't have been commited, it doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
jlecour committed Oct 16, 2010
1 parent 8105aa1 commit 374f2e6
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/geokit-rails3/acts_as_mappable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,6 @@ def adapter
raise UnsupportedAdapter, "`#{connection.adapter_name.downcase}` is not a supported adapter."
end
end

def where(clause)
g self
pattern = Regexp.new("\\b#{distance_column_name}\\b")
value = @distance_formula

g new_clause = if clause.is_a?(String)
clause.gsub!(pattern, value)
elsif clause.is_a?(Array)
clause.first.gsub!(pattern, value)
else
clause
end
super(new_clause)
end

def within(distance, options = {})
options[:within] = distance
Expand Down

0 comments on commit 374f2e6

Please sign in to comment.