Permalink
Browse files

Refactored to use Array#extract_options!, with compatibility for olde…

…r versions or Rails
  • Loading branch information...
1 parent b147141 commit 345db096484e26e203861013805236837b2335dd @danielmorrison danielmorrison committed Jul 27, 2007
Showing with 4 additions and 1 deletion.
  1. +3 −0 init.rb
  2. +1 −1 lib/acts_as_geocodable.rb
View
@@ -10,3 +10,6 @@
ActiveRecord::Base.send :include, CollectiveIdea::Acts::Geocodable
ActionController::Base.send :include, CollectiveIdea::RemoteLocation
+
+
+require File.dirname(__FILE__) + '/lib/compatibility'
@@ -74,7 +74,7 @@ module SingletonMethods
# declaration.
#
def find(*args)
- options = extract_options_from_args! args
+ options = args.extract_options!
origin = location_to_geocode options.delete(:origin)
if origin
options[:units] ||= acts_as_geocodable_options[:units]

0 comments on commit 345db09

Please sign in to comment.