- @comic = Comic.edit(params[:id], @author)
- respond_to do |format|
- if @comic.destroy_with_story
- flash[:notice] = I18n.t('flash.notice.destroyed', :model => Comic.model_name.human)
- format.html { redirect_to '/home/comic' }
- format.json { head :ok }
- else
- flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => Comic.model_name.human)
- format.html { redirect_to @comic }
- format.json { render json: @comic.errors, status: :unprocessable_entity }
- end
- end
+ set_model
+ @item = @my_model_class.edit(params[:id], @operators)
+ render_destroy '/home/' + @item.path_name