diff --git a/lib/geokit-rails3/acts_as_mappable.rb b/lib/geokit-rails3/acts_as_mappable.rb index a1c9003..44e2906 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, :on => :create + before_validation :auto_geocode_address, options.dup.delete_if{|k,v|k == :auto_geocode}.reverse_merge!(:on => :create) end end end