From d88d3c5e89dfc30ed9d8a1320ee3528ff2cb78da Mon Sep 17 00:00:00 2001 From: Splines Date: Tue, 12 Sep 2023 22:03:43 +0200 Subject: [PATCH] Change object to JSON array --- app/controllers/news_popups_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/news_popups_controller.rb b/app/controllers/news_popups_controller.rb index b24f1903b..b00ffcb62 100644 --- a/app/controllers/news_popups_controller.rb +++ b/app/controllers/news_popups_controller.rb @@ -1,7 +1,7 @@ class NewsPopupsController < ApplicationController def index respond_to do |format| - format.json { render json: unseen_news_popups.to_json(except: :id) } + format.json { render json: unseen_news_popups.pluck(:name) } end end