lib/sinatra/assetpack/class_methods.rb in sinatra-assetpack-0.0.10 vs lib/sinatra/assetpack/class_methods.rb in sinatra-assetpack-0.0.11
- old
+ new
@@ -36,10 +36,10 @@
end
# Add the routes for the individual files.
def add_individual_routes!
assets.served.each do |path, from|
- get "/#{path}/*".squeeze('/') do |file|
+ get %r{#{"^/#{path}/".squeeze('/')}(.*)$} do |file|
fmt = File.extname(file)[1..-1]
# Sanity checks
pass unless AssetPack.supported_formats.include?(fmt)
fn = asset_path_for(file, from) or pass