Commit 76d3d2f838a08bd98cd828348634ceb927933ef9
1 parent
7b7b83f2
Exists in
master
and in
1 other branch
use the ProblemDestroy interactiors to destroy problem
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
app/controllers/errs_controller.rb
... | ... | @@ -114,7 +114,9 @@ class ErrsController < ApplicationController |
114 | 114 | end |
115 | 115 | |
116 | 116 | def destroy_several |
117 | - @selected_problems.each(&:destroy) | |
117 | + @selected_problems.each{|problem| | |
118 | + ProblemDestroy.new(problem).execute | |
119 | + } | |
118 | 120 | flash[:notice] = "#{pluralize(@selected_problems.count, 'err has', 'errs have')} been deleted." |
119 | 121 | redirect_to :back |
120 | 122 | end | ... | ... |