diff --git a/app/controllers/episodes_controller.rb b/app/controllers/episodes_controller.rb index f9a01222f..adaea5605 100644 --- a/app/controllers/episodes_controller.rb +++ b/app/controllers/episodes_controller.rb @@ -14,7 +14,7 @@ def index filtered_episodes = episodes.filter_by_title(params[:q]) @published_episodes = filtered_episodes.published.order(published_at: :desc).page(params[:published_page]).per(10) - @scheduled_episodes = filtered_episodes.draft_or_scheduled.order(released_at: :asc).page(params[:scheduled_page]).per(10) + @scheduled_episodes = filtered_episodes.draft_or_scheduled.order("released_at ASC NULLS FIRST").page(params[:scheduled_page]).per(10) end # GET /episodes/1