Forum: Ruby on Rails How to create a route by file extension?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Alan F. (Guest)
on 2007-03-08 09:17
I want to have a controller that handles serving all .js files. But I
don't know how to write the routes.rb map.connect entry so all requests
for javascript files can be routed to my controller.

The .js requests sometimes can have dynamic parameters, such as:

Any idea how to write the routes entry?

This topic is locked and can not be replied to.