From 04fac3a0dc2259b208708ee88eac758bd8cfc6ca Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 14 May 2009 19:51:52 -0300 Subject: [PATCH] ActionItem1049: report not found imediatally --- app/controllers/public/not_found_controller.rb | 5 +++++ config/routes.rb | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) create mode 100644 app/controllers/public/not_found_controller.rb diff --git a/app/controllers/public/not_found_controller.rb b/app/controllers/public/not_found_controller.rb new file mode 100644 index 0000000..1f0a87d --- /dev/null +++ b/app/controllers/public/not_found_controller.rb @@ -0,0 +1,5 @@ +class NotFoundController < ApplicationController + def index + render_not_found + end +end diff --git a/config/routes.rb b/config/routes.rb index 8bbe3a4..6e1f2d9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,6 +21,9 @@ ActionController::Routing::Routes.draw do |map| # You can have the root of your site routed by hooking up '' map.connect '', :controller => "home", :conditions => { :if => lambda { |env| !Domain.hosting_profile_at(env[:host]) } } + map.connect 'images/*stuff', :controller => 'not_found', :action => 'index' + map.connect 'stylesheets/*stuff', :controller => 'not_found', :action => 'index' + # user account controller map.connect 'account/new_password/:code', :controller => 'account', :action => 'new_password' map.connect 'account/:action', :controller => 'account' -- libgit2 0.21.2