From 76a1d3d1dd09367d2fb2de03e4a8115a57b0b7e0 Mon Sep 17 00:00:00 2001 From: vpuzzella Date: Tue, 14 Dec 2010 19:24:35 -0500 Subject: [PATCH] use reject instead of delete_at --- lib/geokit-rails3/acts_as_mappable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/geokit-rails3/acts_as_mappable.rb b/lib/geokit-rails3/acts_as_mappable.rb index 44e2906..943b52e 100644 --- a/lib/geokit-rails3/acts_as_mappable.rb +++ b/lib/geokit-rails3/acts_as_mappable.rb @@ -46,7 +46,7 @@ def acts_as_mappable(options = {}) self.auto_geocode_error_message = options[:auto_geocode][:error_message] || 'could not locate address' # set the actual callback here - before_validation :auto_geocode_address, options.dup.delete_if{|k,v|k == :auto_geocode}.reverse_merge!(:on => :create) + before_validation :auto_geocode_address, options.reject{|k,v|k == :auto_geocode}.reverse_merge!(:on => :create) end end end