Fix exception in legacy /post/index.xml endpoint.
Fixes intermittent `uninitialized constant LegacyController::Builder` exceptions.
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -44,6 +44,7 @@ gem 'webpacker', '>= 4.0.x'
|
|||||||
gem 'retriable'
|
gem 'retriable'
|
||||||
gem 'redis'
|
gem 'redis'
|
||||||
gem 'request_store'
|
gem 'request_store'
|
||||||
|
gem 'builder'
|
||||||
gem 'term-ansicolor', require: "term/ansicolor"
|
gem 'term-ansicolor', require: "term/ansicolor"
|
||||||
|
|
||||||
# needed for looser jpeg header compat
|
# needed for looser jpeg header compat
|
||||||
|
|||||||
@@ -451,6 +451,7 @@ DEPENDENCIES
|
|||||||
bcrypt
|
bcrypt
|
||||||
bigquery!
|
bigquery!
|
||||||
bootsnap
|
bootsnap
|
||||||
|
builder
|
||||||
capistrano (~> 3.10)
|
capistrano (~> 3.10)
|
||||||
capistrano-deploytags (~> 1.0.0)
|
capistrano-deploytags (~> 1.0.0)
|
||||||
capistrano-rails
|
capistrano-rails
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class LegacyController < ApplicationController
|
|||||||
|
|
||||||
respond_with(@posts) do |format|
|
respond_with(@posts) do |format|
|
||||||
format.xml do
|
format.xml do
|
||||||
xml = Builder::XmlMarkup.new(indent: 2)
|
xml = ::Builder::XmlMarkup.new(indent: 2)
|
||||||
xml.instruct!
|
xml.instruct!
|
||||||
xml.posts do
|
xml.posts do
|
||||||
@posts.each { |attrs| xml.post(attrs) }
|
@posts.each { |attrs| xml.post(attrs) }
|
||||||
|
|||||||
Reference in New Issue
Block a user