<p id="notice"><%= notice %></p>

<h1>Views</h1>

<%= bootstrap_table do |table|
  table.headers << 'Name'
  table.headers << 'Model'
  table.headers << 'Code'
  table.headers << 'Edit'

  @views.each do |view|
    table.rows << [
        view.name,
        view.model,
        view.code,
        link_to('Edit view', edit_view_path(view))
    ]
  end
end %>

<br>

<%= link_to 'New View', new_view_path %>

<p id="notice"><%= notice %></p>

<h1>Views</h1>

<%= bootstrap_table do |table|
  table.headers << 'Name'
  table.headers << 'Model'
  table.headers << 'Code'
  table.headers << 'Show'
  table.headers << 'Edit'
  table.headers << 'Destroy'

  @views.each do |view|
    table.rows << [
        view.name,
        view.model,
        view.code,
        link_to('Show view', view_path(view)),
        link_to('Edit view', edit_view_path(view)),
        link_to('Destroy view', view, method: :delete, data: { confirm: 'Are you sure?' })
    ]
  end
end %>

<br>

<%= link_to 'New View', new_view_path %>

Add show and destroy links to views table
Add show and destroy links to views table
