| @@ -79,7 +79,7 @@ module Agents | ||
| 79 | 79 | def handle_payload(payload) | 
| 80 | 80 | location = Location.new(payload) | 
| 81 | 81 |  | 
| 82 | - accuracy_field = interpolated[:accuracy_field].presence || 'accuracy' | |
| 82 | + accuracy_field = interpolated[:accuracy_field].presence || "accuracy" | |
| 83 | 83 |  | 
| 84 | 84 | def accurate_enough?(payload, accuracy_field) | 
| 85 | 85 | !interpolated[:max_accuracy].present? || !payload[accuracy_field] || payload[accuracy_field].to_i < interpolated[:max_accuracy].to_i | 
| @@ -6,7 +6,7 @@ describe Agents::UserLocationAgent do | ||
| 6 | 6 | :name => 'something', | 
| 7 | 7 |                                    :options => { :secret => 'my_secret', | 
| 8 | 8 | :max_accuracy => '50', | 
| 9 | - :distance => '50' }) | |
| 9 | + :min_distance => '50' }) | |
| 10 | 10 | @agent.save! | 
| 11 | 11 | end | 
| 12 | 12 |  |