ph_model 1.0.0 → 1.0.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: 04cf28ca1fecccaf0c306c6259efe62e31cebe87
4
- data.tar.gz: 8b15fce44d2f140b262a851515fa37d122024b7b
3
+ metadata.gz: 75f3ea4942b90c3a4378d456fe347e768bb528ff
4
+ data.tar.gz: b4c0cf2983d15a79ed6a078ebd8c832b2490ccb0
5
5
  SHA512:
6
- metadata.gz: dc1b55bcc96ba908e6c2b7f04fe523e1c027200b58431196843efb19d03ef83d7fba4952a484918b6a04247d8f1dfba2656ead3698f99d6d57b6385a356180fc
7
- data.tar.gz: 4f4050c4dc0a13105a3684d3d48c825e21729c9a4fe1827405529881184a9e12ea1a383afcc58c41f768216f09635d51c1c3dc0f8df67b4f005c27fd8c1e1297
6
+ metadata.gz: d3aedf877ec022e4fffbdbab6d88e4394fb49a5bec17f4792ebfa9362c17763617c60d56c9b87998eaeed4abf7c8135ce11902d2c494ecb48da00a3860f434c3
7
+ data.tar.gz: 0a141fe481993fff323fa11aaac43273ee62cc3e27b516a8a83af27e11e47238bb0046613676ecacd342b1386f5db957b6f9373723972263cd2c7a19684e1919
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.0.0](https://github.com/payrollhero/ph_model/tree/v1.0.0) (2017-04-04)
4
+ [Full Changelog](https://github.com/payrollhero/ph_model/compare/v0.0.1...v1.0.0)
5
+
3
6
  ## [v0.0.1](https://github.com/payrollhero/ph_model/tree/v0.0.1) (2016-02-03)
4
7
  - Initial extract from ph\_utility [\#1](https://github.com/payrollhero/ph_model/pull/1) ([piotrb](https://github.com/piotrb))
5
8
 
@@ -23,7 +23,7 @@ module PhModel
23
23
  end
24
24
 
25
25
  def check_one(value, attribute_name)
26
- return if !value.respond_to?(:valid?) || value.valid?
26
+ return if !value.respond_to?(:valid?) || !value.respond_to?(:errors) || !value.errors.present? || value.valid?
27
27
  value.errors.full_messages.each do |message|
28
28
  errors.add(:base, "#{attribute_name}.#{message}")
29
29
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module PhModel
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.0.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ph_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Banasik