tco_client_core 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tco_client_core/model.rb +2 -1
- data/lib/tco_client_core/response.rb +1 -0
- data/lib/tco_client_core/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: 50e9261a6ff41cbcc4c22eb9aaa1ae8b7ed29706
|
4
|
+
data.tar.gz: 47a2e94f04902579cb0cd24006ac3bad7978e40c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fc98374e301461d60b848b2cc83ccaaaacb61c492c199ec564de508aefcb0d50ae78f5138e26192512949399f59f448c62f8944b19ec7a92a1ee7142a08a025
|
7
|
+
data.tar.gz: dd1f7ac8ad79d754fb5d16e351ca7c77731d6e61c5a195f92dbd1abfe3ae9a6d39d5c866acc8c93e72710d202237b1e7e32b420c73b182d1a6bab53e6a9b697b
|
@@ -3,8 +3,9 @@ require "active_model"
|
|
3
3
|
class TcoClientCore::Model
|
4
4
|
include ActiveModel::Model
|
5
5
|
|
6
|
-
def self.new_with_errors
|
6
|
+
def self.new_with_errors(attributes, errors)
|
7
7
|
model = new attributes
|
8
|
+
return model if errors.nil?
|
8
9
|
errors.each do |key, messages|
|
9
10
|
messages.each do |message|
|
10
11
|
model.errors.add(key.to_sym, message)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tco_client_core
|
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
|
- 2CO Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|