Skip to content

Instantly share code, notes, and snippets.

@deJaVisions
Created March 1, 2012 04:21
Show Gist options
  • Select an option

  • Save deJaVisions/1947247 to your computer and use it in GitHub Desktop.

Select an option

Save deJaVisions/1947247 to your computer and use it in GitHub Desktop.
def destroy
@material = Material.find(params[:id])
@material.destroy
respond_to do |format|
format.html { redirect_to admin_materials_path }
format.json { render json: @material, status: :deleted }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment