morse_contactable 1.0.9 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/addressable.rb +2 -3
- data/lib/morse_contactable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4b0299ed8caf5dc2d79218c218e93a742b5183a
|
4
|
+
data.tar.gz: 3bd0c86b044557ca88058e3c3d49efd65f061887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4dbbc890186cb3cd090035da28ef77f04bb133d108fe9eb7a805dddf13def64c48d55141c95a59a3c6afe90c2b0f44b1157b37e8bf8b3906b1c77e93218ad67
|
7
|
+
data.tar.gz: 942d31f58fb4eacfafbe078618cfd46a1558035f609419963d083926993816c7ccce204dccabed90802ac8c4b2678354a40daf1218d9eb8091ef6f27080f1f3f
|
data/lib/addressable.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
module Addressable
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
include FieldsValidator
|
4
|
-
REQUIRED_DATABASE_FIELDS = [:address1, :address2, :address3, :town, :county, :country, :postcode]
|
5
4
|
|
6
5
|
included do
|
7
6
|
validate_required_attributes
|
@@ -15,7 +14,7 @@ module Addressable
|
|
15
14
|
|
16
15
|
def required_database_fields
|
17
16
|
result=defined?(super) ? super : []
|
18
|
-
result+=
|
17
|
+
result+=[:title, :address1, :address2, :address3, :town, :county, :country, :postcode]
|
19
18
|
end
|
20
19
|
|
21
20
|
def required_addressable_attributes
|
@@ -26,7 +25,7 @@ module Addressable
|
|
26
25
|
public
|
27
26
|
|
28
27
|
def address_array
|
29
|
-
Array.new.tap { |a|
|
28
|
+
Array.new.tap { |a| required_database_fields.select { |key| a<<self.send(key) } }
|
30
29
|
end
|
31
30
|
|
32
31
|
def address_pretty
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morse_contactable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fredmcgroarty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: morse_fields_validator
|