forgot destroy method

This commit is contained in:
manson 2014-07-01 19:24:19 +08:00
parent a396a97407
commit 33bd5ae164
3 changed files with 7 additions and 1 deletions

View File

@ -33,6 +33,11 @@ class Admin::WritingConferencesController < OrbitMemberController
redirect_to '/admin/members/'+@member.to_param+'/WritingConference'
end
def destroy
@writing_conference = WritingConference.find(params[:id])
@writing_conference.destroy
end
def toggle_hide
if params[:ids]
@writing_conferences = WritingConference.any_in(_id: params[:ids])

View File

@ -0,0 +1 @@
$('#writing_conference_<%= @writing_conference.id.to_s%>').remove();

View File

@ -1,4 +1,4 @@
<%= form_for @writing_conference, url: admin_writing_conferences_path(@writing_conference), html: {class: "form-horizontal main-forms previewable"} do |f| %>
<%= form_for @writing_conference, url: admin_writing_conferences_path, html: {class: "form-horizontal main-forms previewable"} do |f| %>
<fieldset>
<%= render partial: 'form', locals: {f: f} %>
</fieldset>