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: f182f94e04c6614db4fc9ca1e8979b9b0c48cfe0
4
- data.tar.gz: b8c2007e6096bd720b17c3ff12a8806e566d8beb
3
+ metadata.gz: 619beae71861d6f910411b93407982c26c4e903e
4
+ data.tar.gz: 8b6ae2d013b7234d4f7b51544c625feb6100580b
5
5
  SHA512:
6
- metadata.gz: 4a3ef8c01c65d272d066e51362b45f4fd736228e12054e2bcd488c3076aadcf4b1fecd87a33c957ec2df8ebe19d76eb9ba23c5f308e91008e765e66d2c4aaf1a
7
- data.tar.gz: bd970931b042cf2d1660f5b40621a7174f5c63e6ae040f0c284c4827c7bd4e652023f972e54385d468412df1a1155a1095b62007a7db635581d77690d84969fd
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 %>, :float
4
- add_column :<%= table_name %>, :<%= options.longitude %>, :float
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
@@ -1,3 +1,3 @@
1
1
  module ScaffoldPlus
2
- VERSION = "1.7.10"
2
+ VERSION = "1.7.11"
3
3
  end
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.10
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-27 00:00:00.000000000 Z
11
+ date: 2014-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord