rails-geocoder 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -3
- data/VERSION +1 -1
- data/lib/geocoder.rb +2 -2
- data/rails-geocoder.gemspec +2 -2
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Geocoder adds object geocoding and database-agnostic distance calculations to Ruby on Rails. It does not rely on proprietary database functions so finding geocoded objects in a given area is easily done using out-of-the-box MySQL or even SQLite.
|
4
4
|
|
5
|
-
== Install
|
5
|
+
== 1. Install
|
6
6
|
|
7
7
|
Install either as a plugin:
|
8
8
|
|
@@ -16,7 +16,7 @@ or as a gem:
|
|
16
16
|
# at command prompt:
|
17
17
|
sudo rake gems:install
|
18
18
|
|
19
|
-
== Configure
|
19
|
+
== 2. Configure
|
20
20
|
|
21
21
|
To add geocoding features to a class:
|
22
22
|
|
@@ -38,7 +38,7 @@ If your model has +address+, +city+, +state+, and +country+ attributes your +loc
|
|
38
38
|
[address, city, state, country].compact.join(', ')
|
39
39
|
end
|
40
40
|
|
41
|
-
== Use
|
41
|
+
== 3. Use
|
42
42
|
|
43
43
|
Assuming +Venue+ is a geocoded model:
|
44
44
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.2
|
data/lib/geocoder.rb
CHANGED
@@ -130,10 +130,10 @@ module Geocoder
|
|
130
130
|
|
131
131
|
##
|
132
132
|
# Fetch coordinates based on the object's location.
|
133
|
-
# Returns an array <tt>[lat,lon]</tt>.
|
133
|
+
# Returns an array <tt>[lat,lon]</tt>.search
|
134
134
|
#
|
135
135
|
def fetch_coordinates
|
136
|
-
location =
|
136
|
+
location = send(self.class.geocoder_options[:method_name])
|
137
137
|
Geocoder.fetch_coordinates(location)
|
138
138
|
end
|
139
139
|
|
data/rails-geocoder.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails-geocoder}
|
8
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Alex Reisner"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-12}
|
13
13
|
s.description = %q{Geocoder adds object geocoding and database-agnostic distance calculations to Ruby on Rails. It does not rely on proprietary database functions so finding geocoded objects in a given area is easily done using out-of-the-box MySQL or even SQLite.}
|
14
14
|
s.email = %q{alex@alexreisner.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-geocoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Reisner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-12 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|