Skip to content

Commit

Permalink
Change @l to food_type in #destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
vidoseaver authored and rylanb committed Mar 25, 2017
1 parent 64d582b commit 21eff4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/food_types_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ def index
end

def destroy
@l = FoodType.find(params[:id])
authorize! :destroy, @l
@l.active = false
@l.save
@food_type = FoodType.find(params[:id])
authorize! :destroy, @food_type
@food_type.active = false
@food_type.save
redirect_to(request.referrer)
end

Expand Down

0 comments on commit 21eff4e

Please sign in to comment.