Commit 04fac3a0dc2259b208708ee88eac758bd8cfc6ca

Authored by Antonio Terceiro
1 parent 6d708956

ActionItem1049: report not found imediatally

We know that images and stylesheets are definitely not available through
the Rails stack, so we don't need to wait until the end to reject
requests for them.
app/controllers/public/not_found_controller.rb 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +class NotFoundController < ApplicationController
  2 + def index
  3 + render_not_found
  4 + end
  5 +end
... ...
config/routes.rb
... ... @@ -21,6 +21,9 @@ ActionController::Routing::Routes.draw do |map|
21 21 # You can have the root of your site routed by hooking up ''
22 22 map.connect '', :controller => "home", :conditions => { :if => lambda { |env| !Domain.hosting_profile_at(env[:host]) } }
23 23  
  24 + map.connect 'images/*stuff', :controller => 'not_found', :action => 'index'
  25 + map.connect 'stylesheets/*stuff', :controller => 'not_found', :action => 'index'
  26 +
24 27 # user account controller
25 28 map.connect 'account/new_password/:code', :controller => 'account', :action => 'new_password'
26 29 map.connect 'account/:action', :controller => 'account'
... ...