Here's one useful snippet:

  def (Before="").new(a,*o)Rack::Cascade.new(o<<a)end

This means that this app:

  module App
    use Before, Rack::File.new('public')
  end

Will pass all requests through Rack::File.new('public') first, and
only proceed to App if that returns 404. This can be very useful for
serving static stuff in development mode (Rack::File will serve files
from the 'public' directory if it matches the URL; e.g.
./public/jquery.js will be available at localhost:3301/jquery.js)

Maybe we should add it to camping.rb?

// Magnus Holm
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to