Select path when loading buffered article urls (#4651) [ci skip]

This commit is contained in:
Molly Struve 2019-10-30 09:37:22 -05:00 committed by Mac Siri
parent 095df7df27
commit fd3d87c759

View file

@ -11,6 +11,7 @@ class BufferedArticlesController < ApplicationController
if Rails.env.production?
Article.
where("last_buffered > ? OR published_at > ?", 24.hours.ago, 20.minutes.ago).
select(:path).
map { |a| "https://#{ApplicationConfig['APP_DOMAIN']}#{a.path}" }
else
Article.all.map { |a| "https://#{ApplicationConfig['APP_DOMAIN']}#{a.path}" }