module ActionController::ImplicitRender
def default_render
def default_render if template_exists?(action_name.to_s, _prefixes, variants: request.variant) render elsif any_templates?(action_name.to_s, _prefixes) message = "#{self.class.name}\##{action_name} is missing a template " \ "for this request format and variant.\n" \ "\nrequest.formats: #{request.formats.map(&:to_s).inspect}" \ "\nrequest.variant: #{request.variant.inspect}" raise ActionController::UnknownFormat, message elsif interactive_browser_request? message = "#{self.class.name}\##{action_name} is missing a template for request formats: #{request.formats.map(&:to_s).join(',')}" raise ActionController::MissingExactTemplate.new(message, self.class, action_name) else logger.info "No template found for #{self.class.name}\##{action_name}, rendering head :no_content" if logger super end end