调用渲染引发 "Undefined method 'logger' for true class"

calling render raises "Undefined method 'logger' for true class"

我不知道是什么导致了这个问题。如果我在我的控制器中调用 render 的任何变体,它会引发以下内容:

NoMethodError: undefined method `logger' for true:TrueClass
from /Users/username/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.3/lib/active_support/configurable.rb:113:in `logger'

我查了active_support/configurable.rb:113,不太明白它在比较和提高什么。我有其他控制器,它们都共享同一个基本控制器,当我 render.

时不会抛出此错误

我在这里没有看到什么?

编辑

调用渲染
class Device::V1::DeviceController < ApplicationController

  def status
    render json: { foo: 'bar' }, status: :ok
  end
end

下面是我的应用控制器

class ApplicationController < ActionController::API
  include ActionController::HttpAuthentication::Token::ControllerMethods
  before_action :authenticate!

  private

  def authenticate!
    authenticate_or_request_with_http_token do |token, options|
      token == SECRET[:api_key]
    end
  end
end

Rails 5.1.3

Ruby 2.3.4

更新 我在这个控制器中有一个方法叫做 config。显然这是一个与 ActiveSupport

冲突的保留名称空间

我有一个名为 config 的控制器方法。这是一个保留名称。