diff --git a/app/controllers/admin/writing_conferences_controller.rb b/app/controllers/admin/writing_conferences_controller.rb index 0bad96e..035a1df 100644 --- a/app/controllers/admin/writing_conferences_controller.rb +++ b/app/controllers/admin/writing_conferences_controller.rb @@ -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]) diff --git a/app/views/admin/writing_conferences/destroy.js.erb b/app/views/admin/writing_conferences/destroy.js.erb new file mode 100644 index 0000000..35ab849 --- /dev/null +++ b/app/views/admin/writing_conferences/destroy.js.erb @@ -0,0 +1 @@ +$('#writing_conference_<%= @writing_conference.id.to_s%>').remove(); \ No newline at end of file diff --git a/app/views/admin/writing_conferences/new.html.erb b/app/views/admin/writing_conferences/new.html.erb index 896cf60..f21a037 100644 --- a/app/views/admin/writing_conferences/new.html.erb +++ b/app/views/admin/writing_conferences/new.html.erb @@ -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| %>