From 1733c88a0743f132fddc62c703a6260204014dfc Mon Sep 17 00:00:00 2001 From: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> Date: Thu, 22 Oct 2020 14:35:58 -0600 Subject: [PATCH] Ability to Mark Podcasts as Published in Admin Podcasts (#11024) [deploy] * Adds ability to publish/unpublish Podcasts via /admin/podacasts/id/edit - Moves ability to Admin to remove reliability of resource_admin - Adds published to podcast_params in Admin::PodcastsController * Adds a test to check the successful publishing of a podcast in podcasts_spec.rb * Reverts change to podcast.reload in podcasts_spec.rb --- app/controllers/admin/podcasts_controller.rb | 2 +- app/views/admin/podcasts/edit.html.erb | 7 +++++++ spec/requests/admin/podcasts_spec.rb | 8 +++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/podcasts_controller.rb b/app/controllers/admin/podcasts_controller.rb index 8e6223543..cea349fad 100644 --- a/app/controllers/admin/podcasts_controller.rb +++ b/app/controllers/admin/podcasts_controller.rb @@ -65,7 +65,7 @@ module Admin def podcast_params allowed_params = %i[ - title feed_url + title feed_url published ] params.require(:podcast).permit(allowed_params) end diff --git a/app/views/admin/podcasts/edit.html.erb b/app/views/admin/podcasts/edit.html.erb index f8148e949..cc2abf3a8 100644 --- a/app/views/admin/podcasts/edit.html.erb +++ b/app/views/admin/podcasts/edit.html.erb @@ -64,6 +64,13 @@ <%= f.label :feed_url, for: "podcast_feed_url" %> <%= f.text_field :feed_url, class: "form-control" %> +