activerecord-postgres-earthdistance 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 58158315f51807ac20490fbb85841a740be79e1d
|
|
4
|
+
data.tar.gz: 26dfea461f23018d4bbc99475ea78e2191ee8ec4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8295d79c88d766e988840c717fd7818aaedaf3474d3fd61ce68fa142e858cba67c30fe17ee79e5b2c4cebdbc626ef235583d08cfa9c61dd2df255c20f98a820
|
|
7
|
+
data.tar.gz: 28a89d10aa27f974058faafb0f0c9d607c28b4c9564ad6c7be07a7eaf36ce986b723c0a6f903c8a7918cc9094b22e293ddfb5efcc83621a952a132b33f78a0dc
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
activerecord-postgres-earthdistance (0.3.
|
|
4
|
+
activerecord-postgres-earthdistance (0.3.1)
|
|
5
5
|
pg
|
|
6
6
|
rails (>= 3.1)
|
|
7
7
|
rake
|
|
@@ -39,7 +39,7 @@ GEM
|
|
|
39
39
|
diff-lcs (1.1.3)
|
|
40
40
|
erubis (2.7.0)
|
|
41
41
|
hike (1.2.3)
|
|
42
|
-
i18n (0.6.
|
|
42
|
+
i18n (0.6.9)
|
|
43
43
|
json (1.7.6)
|
|
44
44
|
mail (2.5.4)
|
|
45
45
|
mime-types (~> 1.16)
|
|
@@ -18,7 +18,7 @@ module ActiveRecordPostgresEarthdistance
|
|
|
18
18
|
lat, lng, radius, lat, lng, radius])
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def order_by_distance lat, lng, order
|
|
21
|
+
def order_by_distance lat, lng, order= "ASC"
|
|
22
22
|
order("earth_distance(ll_to_earth(#{self.latitude_column}, #{self.longitude_column}), ll_to_earth(#{lat}, #{lng})) #{order}")
|
|
23
23
|
end
|
|
24
24
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-postgres-earthdistance
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Diogo Biazus
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-12-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|