|
|
@ -131,12 +131,12 @@ class HacksController < ApplicationController
|
|
|
|
def new;end
|
|
|
|
def new;end
|
|
|
|
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
def destroy
|
|
|
|
@hack.destroy
|
|
|
|
|
|
|
|
base_attrs = {
|
|
|
|
base_attrs = {
|
|
|
|
user_id: user_id, viewed: 0, tiding_type: 'System', trigger_user_id: current_user.id,
|
|
|
|
user_id: @hack.user_id, viewed: 0, tiding_type: 'System', trigger_user_id: current_user.id,
|
|
|
|
parent_container_type: "HackDelete"
|
|
|
|
parent_container_type: "HackDelete"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@hack.tidings.create!(base_attrs)
|
|
|
|
@hack.tidings.create!(base_attrs)
|
|
|
|
|
|
|
|
@hack.destroy
|
|
|
|
render_ok
|
|
|
|
render_ok
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|