.container .row .col-lg-12.col-md-12.col-sm-12.col-xs-12 %h3.text-center Listing car Models %hr = link_to 'New Car model', new_car_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 - @car_models.each do |car_model| %tr %td - @brands.each do |car_brand| - if car_model.car_brand_id == car_brand.id = car_brand.brand %td= car_model.model %td= link_to 'Show', car_model, class:'btn btn-primary' %td= link_to 'Edit', edit_car_model_path(car_model), class: 'btn btn-warning' %td= link_to 'Destroy', car_model, :method => :delete, :data => { confirm: 'Are you sure?' }, class: 'btn btn-danger' %br