jt-rails-address 1.3.0 → 1.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: 8391f7cbcd928765fe623c06b9e12e38fe060e64
4
- data.tar.gz: 613b2af0a4bb8a654916268a84bffba359cb523e
3
+ metadata.gz: 653028d952fe3f55f94e32d4720f94cc03eb53ee
4
+ data.tar.gz: bcf8c000a70264ad4467a1dd3dfdf8f65b32e391
5
5
  SHA512:
6
- metadata.gz: a9f7e8e8812b62d5b4811e82b3b287a372ebec027288ba2e9792079fe405a4ab288b064f0ddd24371459162e794669cc7437a59d9625264c4504e2725b79e2d1
7
- data.tar.gz: f59265fb49fab32e9bd0b16bee376a9ff43866da895a8d9e9f2e09c1c2a6bcfe7641ad91ba70ffbc42ef3f5784bbf7a920d7551d75315566fc0e54738a068be5
6
+ metadata.gz: cba2cd672c2613d555103c9f3131f1f87878bd74912da3a85ea2d1f690e5e0eb9785ed3b68e4da822f98564ead736b2225c2d0e42c91bf64acf2accb7de8474d
7
+ data.tar.gz: e423776871761a84c8a239c88936ae25097b73e54c6ab8991c2fc009381f701a5e193206c9c641153027e996b2cdc6bbc62ee7a14421b09cc9f5f2c2f6391b58
data/README.md CHANGED
@@ -41,7 +41,7 @@ It will create all the fields you need for address management:
41
41
  - `formatted_address`, "Empire State Building, 350 5th Ave, New York, NY 10118"
42
42
  - `street_number`, "350"
43
43
  - `street_name`, "5th Ave"
44
- - `street`, "350 5th Ave", it's a concatenation of `street_number` and `street_name`
44
+ - `street`, "350 5th Ave", it's the concatenation of `street_number` and `street_name`
45
45
  - `city`
46
46
  - `zip_code`
47
47
  - `department`
@@ -138,10 +138,10 @@ data = JT::Rails::Address.search("Eiffel Tower", "YOUR GOOGLE API KEY", {compone
138
138
  # Use the data retrieve from Google Maps API
139
139
  my_instance.load_address(:address, data)
140
140
 
141
- # Use the set a nil all address fileds
141
+ # Use the set a nil all address fields
142
142
  my_instance.reset_address(:address)
143
143
 
144
- # Use the set a nil all address fileds with HTML forms
144
+ # Use the set a nil all address fields with HTML forms
145
145
  my_instance.update({address_destroy: true})
146
146
  ```
147
147
 
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
3
3
  s.summary = "Postal addresses management in Ruby On Rails and Javascript"
4
4
  s.description = "JTRailsAddress simplify postal addresses management and geocoding with Google Maps in Ruby On Rails and Javascript."
5
5
  s.homepage = 'https://github.com/jonathantribouharet/jt-rails-address'
6
- s.version = '1.3.0'
6
+ s.version = '1.3.1'
7
7
  s.files = `git ls-files`.split("\n")
8
8
  s.require_paths = ['lib']
9
9
  s.authors = ['Jonathan TRIBOUHARET']
@@ -38,7 +38,8 @@ module JT::Rails::Address::Validators
38
38
 
39
39
  def check_if_reset_address
40
40
  for address_field in self.class.jt_rails_address_fields
41
- if [1, true].include?(self.send("#{address_field}_destroy"))
41
+ # In Rails 5 ActiveRecord::Type::Boolean.new.cast
42
+ if [1, true, "1", "true"].include?(self.send("#{address_field}_destroy"))
42
43
  reset_address(address_field)
43
44
  end
44
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jt-rails-address
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan TRIBOUHARET
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-10 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graticule