scaffold_plus 1.7.10 → 1.7.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 619beae71861d6f910411b93407982c26c4e903e
|
4
|
+
data.tar.gz: 8b6ae2d013b7234d4f7b51544c625feb6100580b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85eea92393cf8e0feee61ce6850e22bd6d51227eb1e065f1022042c4d4aadcc98586e36bc13fcf377df2985612578bc0deba395679bf6be42276ce5c5daca9c5
|
7
|
+
data.tar.gz: 17b3277c71716cd7ecf3bab9c1dfaa9b87850c0011c3921a211e2e9ac77b3665d4783f02a12b5f46ae8426a713eab63eb271813ad005d3b8c4aac3a8995da34b
|
@@ -33,7 +33,7 @@ module ScaffoldPlus
|
|
33
33
|
lines = options.before? ? [ "" ] : []
|
34
34
|
lines << [
|
35
35
|
" def to_lat_lon",
|
36
|
-
" [#{lat}, #{lng}]",
|
36
|
+
" [#{lat}.to_f, #{lng}.to_f]",
|
37
37
|
" end",
|
38
38
|
"",
|
39
39
|
" def as_dms(value)",
|
@@ -46,10 +46,10 @@ module ScaffoldPlus
|
|
46
46
|
" # Normalize geo information",
|
47
47
|
" wgs84 = Wgs84.new",
|
48
48
|
" if self.#{lat}.present?",
|
49
|
-
" self.#{lat} = wgs84.as_deg(self.#{lat})",
|
49
|
+
" self.#{lat} = wgs84.as_deg(self.#{lat}.to_f)",
|
50
50
|
" end",
|
51
51
|
" if self.#{lng}.present?",
|
52
|
-
" self.#{lng} = wgs84.as_deg(self.#{lng})",
|
52
|
+
" self.#{lng} = wgs84.as_deg(self.#{lng}.to_f)",
|
53
53
|
" end",
|
54
54
|
" end",
|
55
55
|
""
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class <%= migration_name.camelize %> < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
add_column :<%= table_name %>, :<%= options.latitude %>, :
|
4
|
-
add_column :<%= table_name %>, :<%= options.longitude %>, :
|
3
|
+
add_column :<%= table_name %>, :<%= options.latitude %>, :decimal, precision: 9, scale: 6
|
4
|
+
add_column :<%= table_name %>, :<%= options.longitude %>, :decimal, precision: 9, scale: 6
|
5
5
|
<%- if options.address? -%>
|
6
6
|
add_column :<%= table_name %>, :address, :string
|
7
7
|
add_column :<%= table_name %>, :country, :string
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scaffold_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Volker Wiegand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|