Skip to content

Commit

Permalink
iterator errors as an array (6.1.3.1 change)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrock committed Feb 11, 2023
1 parent ed065ad commit 1462729
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/controllers/ops_controller/settings/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ def fetch_advanced_settings(resource)
def save_advanced_settings(resource)
resource.add_settings_for_resource_yaml(@edit[:new][:file_data])
rescue Vmdb::Settings::ConfigurationInvalid => err
err.errors.each do |field, msg|
add_flash("#{field.to_s.titleize}: #{msg}", :error)
err.errors.each do |error|
add_flash("#{error.attribute.to_s.titleize}: #{error.message}", :error)
end
@changed = (@edit[:new] != @edit[:current])
javascript_flash
Expand Down Expand Up @@ -315,8 +315,8 @@ def settings_update_ldap_verify
if valid
add_flash(_("LDAP Settings validation was successful"))
else
errors.each do |field, msg|
add_flash("#{field.titleize}: #{msg}", :error)
errors.each do |error|
add_flash("#{error.attribute.to_s.titleize}: #{error.message}", :error)
end
end

Expand All @@ -336,8 +336,8 @@ def settings_update_amazon_verify
if valid
add_flash(_("Amazon Settings validation was successful"))
else
errors.each do |field, msg|
add_flash("#{field.titleize}: #{msg}", :error)
errors.each do |error|
add_flash("#{error.attribute.to_s.titleize}: #{error.message}", :error)
end
end
javascript_flash
Expand Down

0 comments on commit 1462729

Please sign in to comment.