Skip to content

Commit

Permalink
Substitute distance in where values only if there is an origin
Browse files Browse the repository at this point in the history
  • Loading branch information
jlecour committed Oct 16, 2010
1 parent 792ae31 commit 48b3ed3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/geokit-rails3/acts_as_mappable.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def geo_scope(options = {})
distance_conditions = distance_conditions(options) distance_conditions = distance_conditions(options)
arel = arel.where(distance_conditions) if distance_conditions arel = arel.where(distance_conditions) if distance_conditions


arel = substitute_distance_in_where_values(arel, origin, units, formula) if origin
arel = substitute_distance_in_where_values(arel, origin, units, formula)
end
end end


arel arel
Expand Down

0 comments on commit 48b3ed3

Please sign in to comment.