.container .text-end = link_to new_master_section_path, :class => 'btn btn-primary' do | Add New Master section h1 | Master Sections h2 Global table.table.table-striped thead tr th | Name th th tbody - @master_sections.where(project_id: nil).each do | master_section | tr td = master_section.name td = link_to 'Edit', edit_master_section_path(master_section) , class: "btn btn-warning" td = button_to 'Delete', master_section, method: :delete, data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } , class: "btn btn-danger" - @master_sections.where.not(project_id: nil).group_by(&:project).each do |project, master_sections| h2= project.title table.table.table-striped thead tr th | Name th th tbody - master_sections.each do | master_section | tr td = master_section.name td = link_to 'Edit', edit_master_section_path(master_section) , class: "btn btn-warning" td = button_to 'Delete', master_section, method: :delete, data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } , class: "btn btn-danger"