class ErrorsController < ApplicationController
  skip_before_action :authenticate_user!, raise: false

  def show
    render status: status, template: "errors/#{status_code}"
  end

  protected

  def status_code
    params[:code] || :internal_server_error # 500
  end
end

class ErrorsController < ApplicationController
  skip_before_action :authenticate_user!, raise: false

  def show
    render status: status, template: "errors/#{status_code}", formats: [:html]
  end

  protected

  def status_code
    params[:code] || :internal_server_error # 500
  end
end

Fix dynamic error rendering for production
Fix dynamic error rendering for production

* Explicitly specify to render html template
