Closed shaicoleman closed 13 years ago
In Rails 3 -- we're simply using the Rails API for routing. We don't decide when the route gets loaded, Rails 3 does. If you'd like to fix this for your app, I'd suggest adding the route yourself:
match "/#{Jammit.package_path}/:package.:extension",
:to => 'jammit#package', :as => :jammit, :constraints => {
# A hack to allow extension to include "."
:extension => /.+/
}
You could prepend instead of append the jammit route in lib/jammit/railtie.rb:
app.routes_reloader.paths.insert 0, File.join(File.dirname(__FILE__), "..", "..", "rails", "routes.rb")
then it gets loaded first.
Cheers Lars
Jammit 0.5.4, Rails 3.0.1
When a catchall route is present, the Jammit routes aren't loaded in production mode: match '*path' => 'mycontroller#catchall'
The jammit routes should be loaded earlier to prevent this issue.