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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C5a54e91a512b0b06e3d940f9c5bcb2f?d=identicon&s=25 Alan Feng (snowbug)
on 2007-03-08 08: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:
prototype.js?234241.

Any idea how to write the routes entry?

Thanks!
This topic is locked and can not be replied to.