Class: Katalyst::Navigation::Editor::Errors

Inherits:
Base
  • Object
show all
Defined in:
app/helpers/katalyst/navigation/editor/errors.rb

Constant Summary

Constants inherited from Base

Base::ATTRIBUTES_SCOPE, Base::ITEM_CONTROLLER, Base::LIST_CONTROLLER, Base::MENU_CONTROLLER, Base::NEW_ITEM_CONTROLLER, Base::STATUS_BAR_CONTROLLER, Base::TURBO_FRAME

Instance Attribute Summary

Attributes inherited from Base

#menu, #template

Instance Method Summary collapse

Methods inherited from Base

#initialize, #menu_form_id

Constructor Details

This class inherits a constructor from Katalyst::Navigation::Editor::Base

Instance Method Details

#build(**options) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/helpers/katalyst/navigation/editor/errors.rb', line 7

def build(**options)
  turbo_frame_tag dom_id(menu, :errors) do
    next unless menu.errors.any?

    tag.div(class: "navigation-errors", **options) do
      tag.h2("Errors in navigation") +
        tag.ul(class: "errors") do
          menu.errors.each do |error|
            concat(tag.li(error.message))
          end
        end
    end
  end
end