The Extension filter chops a file extension off from the end of the recognized path. When a path is generated the filter re-adds the extension to the path accordingly.
incoming url: /products.xml filtered url: /products generated url: /products.xml
You can install the filter like this:
# in config/routes.rb Rails.application.routes.draw do filter :extension end