.container .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h3.text-center Yacht Models %hr = link_to 'New Yacht model', new_yacht_model_path, class: 'btn btn-lg btn-block btn-success' %hr .col-lg-3.col-md-3.col-sm-12.col-xs-12 =render 'layouts/admin/side_menu' .col-lg-9.col-md-9.col-sm-12.col-xs-12 %table.table.table-striped.table-bordered.table-hover %tr %th Brand %th Model %th %th %th - @yacht_models.each do |yacht_model| %tr %td - @brands.each do |yacht_brand| - if yacht_model.yacht_brand_id == yacht_brand.id = yacht_brand.brand %td= yacht_model.model %td= link_to 'Show', yacht_model, class: 'btn btn-primary' %td= link_to 'Edit', edit_yacht_model_path(yacht_model), class: 'btn btn-warning' %td= link_to 'Destroy', yacht_model, :method => :delete, :data => { confirm: 'Are you sure?' }, class:'btn btn-danger' %br