From 758ceaf5e3fd24cfd9cfb9ba8490596c69cfc602 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 7 Mar 2014 11:09:25 +0800 Subject: [PATCH] announcement update with emtpy tag --- .../panel/announcement/back_end/bulletins_controller.rb | 2 +- app/views/panel/announcement/back_end/bulletins/_form.html.erb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/app/controllers/panel/announcement/back_end/bulletins_controller.rb index de369ee..2a42d4d 100644 --- a/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -122,7 +122,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController def update @bulletin = Bulletin.find(params[:id]) - + params[:bulletin][:tag_ids] = (params[:bulletin][:tag_ids] ? params[:bulletin][:tag_ids] : []) delete_out_invalid_date_from_params respond_to do |format| if @bulletin.update_attributes(params[:bulletin]) diff --git a/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/app/views/panel/announcement/back_end/bulletins/_form.html.erb index 1273075..d124fac 100644 --- a/app/views/panel/announcement/back_end/bulletins/_form.html.erb +++ b/app/views/panel/announcement/back_end/bulletins/_form.html.erb @@ -100,7 +100,6 @@ <% @tags.each do |tag| %> <% end %>