Implement index action. Repair destroy

This commit is contained in:
Maximilian Grundke
2017-10-15 18:23:58 +02:00
parent e52c9213a1
commit d353dbaf5b
5 changed files with 52 additions and 20 deletions

View File

@@ -0,0 +1,19 @@
h1 = UserExerciseFeedback.model_name.human(count: 2)
.table-responsive
table.table
thead
tr
th colspan=2 = t('activerecord.attributes.user_exercise_feedback.user')
th = t('activerecord.attributes.user_exercise_feedback.exercise')
th colspan=2 = t('shared.actions')
tbody
- @uefs.each do |uef|
tr
td = uef.user.id
td = uef.user.name
td = link_to(uef.exercise.title, uef.exercise)
td = link_to(t('shared.show'), uef)
td = link_to(t('shared.destroy'), uef, data: {confirm: t('shared.confirm_destroy')}, method: :delete)
= render('shared/pagination', collection: @uefs)