Add destroy.js.erb
This commit is contained in:
parent
813a6b88d9
commit
3e9051cc19
|
|
@ -61,9 +61,13 @@ class Admin::CoursesController < OrbitMemberController
|
|||
def edit
|
||||
end
|
||||
|
||||
def destroy
|
||||
def destroy
|
||||
@course.destroy
|
||||
redirect_to admin_courses_path(:page => params[:page])
|
||||
respond_to do |format|
|
||||
format.html { redirect_to admin_courses_path(:page => params[:page]) }
|
||||
format.js
|
||||
format.json { render json: { "success" => true } }
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
@ -212,4 +216,4 @@ class Admin::CoursesController < OrbitMemberController
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
$('#<%= dom_id(@course) %>').remove();
|
||||
Loading…
Reference in New Issue