mirror of
https://github.com/internetee/registry.git
synced 2025-06-02 18:58:35 +02:00
Refactor epp error due to Rails 6.1 changes
This commit is contained in:
parent
39bbe6e06d
commit
c613de1a11
5 changed files with 12 additions and 11 deletions
|
@ -1,5 +1,8 @@
|
|||
module EppErrors
|
||||
extend ActiveSupport::Concern
|
||||
included do
|
||||
attr_accessor :epp_errors
|
||||
end
|
||||
|
||||
def construct_epp_errors
|
||||
epp_errors = []
|
||||
|
@ -19,9 +22,7 @@ module EppErrors
|
|||
|
||||
epp_errors << collect_parent_errors(attr, errors)
|
||||
end
|
||||
|
||||
errors.add(:epp_errors, epp_errors)
|
||||
errors[:epp_errors].flatten!
|
||||
errors.add(:epp_errors, epp_errors) unless epp_errors.empty?
|
||||
end
|
||||
|
||||
def collect_parent_errors(attr, errors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue