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 'redis'
|
||||
gem 'request_store'
|
||||
gem 'builder'
|
||||
gem 'term-ansicolor', require: "term/ansicolor"
|
||||
|
||||
# needed for looser jpeg header compat
|
||||
|
||||
@@ -451,6 +451,7 @@ DEPENDENCIES
|
||||
bcrypt
|
||||
bigquery!
|
||||
bootsnap
|
||||
builder
|
||||
capistrano (~> 3.10)
|
||||
capistrano-deploytags (~> 1.0.0)
|
||||
capistrano-rails
|
||||
|
||||
@@ -7,7 +7,7 @@ class LegacyController < ApplicationController
|
||||
|
||||
respond_with(@posts) do |format|
|
||||
format.xml do
|
||||
xml = Builder::XmlMarkup.new(indent: 2)
|
||||
xml = ::Builder::XmlMarkup.new(indent: 2)
|
||||
xml.instruct!
|
||||
xml.posts do
|
||||
@posts.each { |attrs| xml.post(attrs) }
|
||||
|
||||
Reference in New Issue
Block a user