Skip to content

Instantly share code, notes, and snippets.

@kopylovvlad
Last active May 16, 2017 18:43
Show Gist options
  • Save kopylovvlad/56d4d98e085446156437df9b5349c9af to your computer and use it in GitHub Desktop.
Save kopylovvlad/56d4d98e085446156437df9b5349c9af to your computer and use it in GitHub Desktop.
# app/statistics/weekly.html.slim
table.table
thead
tr
td Day
td Pizza count
td Orders sum
td Users
td Pizza
tbody
- @weekly.each do |weekly_item|
tr
td= weekly_item[:day]
td= weekly_item[:pizza_count]
td= "$#{weekly_item[:orders_sum]}"
td
- weekly_item[:user_item].each do |user_item|
= link_to "#{user_item[:user].email} (#{user_item[:sum]})", admin_user_path(user_item[:user])
br
td
- weekly_item[:pizza_item].each do |pizza_item|
= link_to "#{pizza_item[:pizza].title} (#{pizza_item[:count]})", admin_tem_path(pizza_item[:pizza])
br
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment