sausage-sandwich/ruby_sandwich

View on GitHub
apps/admin/templates/ingredients/index.html.slim

Summary

Maintainability
Test Coverage
.row
  h1 Ingredients
.row
  table.table.table-sm.table-bordered.table-striped.w-75
    tr
      th Title
      th Protein
      th Fat
      th Carbs
    - ingredients.each do |ingredient|
      tr
        td = link_to ingredient.title, Admin.routes.path(:edit_ingredient, id: ingredient.id)
        td = display_g(ingredient.protein_mg)
        td = display_g(ingredient.fat_mg)
        td = display_g(ingredient.carbohydrates_mg)