add admin :destroy
This commit is contained in:
parent
43a70af1be
commit
2ce3a4d5b6
|
@ -2,7 +2,7 @@ class Admin::ActivitiesController < OrbitMemberController
|
||||||
layout "member_plugin"
|
layout "member_plugin"
|
||||||
#include Admin::PersonalActivitiesHelper
|
#include Admin::PersonalActivitiesHelper
|
||||||
|
|
||||||
before_action :set_activity, only: [:edit, :update]
|
before_action :set_activity, only: [:edit, :update, :destroy]
|
||||||
#before_action :set_plugin
|
#before_action :set_plugin
|
||||||
|
|
||||||
#before_action :need_access_right
|
#before_action :need_access_right
|
||||||
|
@ -41,6 +41,15 @@ class Admin::ActivitiesController < OrbitMemberController
|
||||||
redirect_to params['referer_url']
|
redirect_to params['referer_url']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@activity.destroy
|
||||||
|
respond_to do |format|
|
||||||
|
format.html { redirect_to(admin_activities_url) }
|
||||||
|
format.js
|
||||||
|
format.json { render json: { "success" => true } }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_activity
|
def set_activity
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
$("#<%= dom_id @activity %>").remove();
|
Loading…
Reference in New Issue