diff --git a/app/controllers/admin/announcements_controller.rb b/app/controllers/admin/announcements_controller.rb index 47d51d6..a14c54c 100644 --- a/app/controllers/admin/announcements_controller.rb +++ b/app/controllers/admin/announcements_controller.rb @@ -470,7 +470,14 @@ class Admin::AnnouncementsController < OrbitAdminController end def feed_params - params.require(:bulletin_feed).permit! + feed_params = params.require(:bulletin_feed).permit! + if feed_params[:tag_ids].nil? + feed_params[:tag_ids] = [] + end + if feed_params[:category_ids].nil? + feed_params[:category_ids] = [] + end + feed_params end def settings_params diff --git a/app/views/admin/announcements/_edit_feed_form.html.erb b/app/views/admin/announcements/_edit_feed_form.html.erb index ff43193..8ed9ef6 100644 --- a/app/views/admin/announcements/_edit_feed_form.html.erb +++ b/app/views/admin/announcements/_edit_feed_form.html.erb @@ -14,45 +14,45 @@

<%=t(:tags)%>

- +

<%=t(:category)%>

- +
diff --git a/app/views/admin/announcements/_feed_form.html.erb b/app/views/admin/announcements/_feed_form.html.erb index a3bbe2b..c5caf4e 100644 --- a/app/views/admin/announcements/_feed_form.html.erb +++ b/app/views/admin/announcements/_feed_form.html.erb @@ -14,45 +14,45 @@

<%=t(:tags)%>

- +

<%=t(:category)%>

- +
diff --git a/app/views/admin/announcements/feed.html.erb b/app/views/admin/announcements/feed.html.erb index 8380220..63ea54d 100644 --- a/app/views/admin/announcements/feed.html.erb +++ b/app/views/admin/announcements/feed.html.erb @@ -91,8 +91,10 @@ $(".tag-checkbox").on("click",function(){ if($(this).is(":checked")){ $(this).parent().addClass("active"); + $(this).parent().parent().addClass("active"); }else{ - $(this).parent().removeClass("active"); + $(this).parent().removeClass("active"); + $(this).parent().parent().removeClass("active"); } })