'Fix deprecation warning for an internationalization locale suffix in ruby on rails 6.1

In a controller, I am rendering a page and providing the internationalization information with a locale_suffix. For example

def create
      ...
      render "new#{locale_suffix}"
end

A typical local_suffix might be 'fr' for france, so it would be rendering new.fr. Upgrading to rails 6.1.2.4, I am seeing the following deprecation warning

DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: clubs/new.fr

How do I fix this warning?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source