Skip to content

Commit

Permalink
account for model validation errors in output
Browse files Browse the repository at this point in the history
  • Loading branch information
idletea committed Jul 25, 2022
1 parent c054f30 commit 00ae81e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 6.5.10
- print the full error for ActiveModel::Error errors

## 6.5.9
- Relax version requirements for the google-cloud-dns gem

Expand Down
4 changes: 1 addition & 3 deletions lib/record_store/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ def validate_records
invalid_zones << zone.unrooted_name

puts "#{zone.unrooted_name} definition is not valid:"
zone.errors.each do |field, msg|
puts " - #{field}: #{msg}"
end
puts zone.errors.full_messages.map { |msg| " - #{msg}" }

invalid_records = zone.records.reject(&:valid?)
puts ' Invalid records' unless invalid_records.empty?
Expand Down
2 changes: 1 addition & 1 deletion lib/record_store/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RecordStore
VERSION = '6.5.9'.freeze
VERSION = '6.5.10'.freeze
end

0 comments on commit 00ae81e

Please sign in to comment.