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,7 +114,9 @@ class ErrsController < ApplicationController | ||
114 | end | 114 | end |
115 | 115 | ||
116 | def destroy_several | 116 | def destroy_several |
117 | - @selected_problems.each(&:destroy) | 117 | + @selected_problems.each{|problem| |
118 | + ProblemDestroy.new(problem).execute | ||
119 | + } | ||
118 | flash[:notice] = "#{pluralize(@selected_problems.count, 'err has', 'errs have')} been deleted." | 120 | flash[:notice] = "#{pluralize(@selected_problems.count, 'err has', 'errs have')} been deleted." |
119 | redirect_to :back | 121 | redirect_to :back |
120 | end | 122 | end |