fix bug on closet_hangers#destroy in html format

This commit is contained in:
Emi Matchu 2012-04-08 17:04:44 -05:00
parent 64054d412e
commit e3b0a5e2d7

View file

@ -6,6 +6,7 @@ class ClosetHangersController < ApplicationController
def destroy def destroy
@closet_hanger = current_user.closet_hangers.find params[:id] @closet_hanger = current_user.closet_hangers.find params[:id]
@closet_hanger.destroy @closet_hanger.destroy
@item = @closet_hanger.item
respond_to do |format| respond_to do |format|
format.html { redirect_after_destroy! } format.html { redirect_after_destroy! }
format.json { render :json => true } format.json { render :json => true }