Closed christianhellsten closed 13 years ago
There are two ways you can remedy this.
One way is to declare your catchall route after the assets
block.
class App
assets do
css :foo, [ '/css/bar.css', ... ]
end
get '/*' do
do_stuff
end
end
or use Sinatra's pass
to stop processing the catch-all route when it's something that it shouldn't handle.
class App
get '/*' do
pass unless valid?
do_stuff
end
assets do
css :foo, [ '/css/bar.css', ... ]
end
end
I don't think there's a way for AssetPack to make a workaround for this as there's no way to define route priorities in Sinatra other than definition order.
I have a catch-all route:
This breaks requests to http://localhost/css/application.css, which are routed to the catch-all method instead of assetpack. http://localhost/js/application.js works…