def edit
begin
@user = User.find(params[:id])
rescue ActiveRecord::RecordNotFound
logger.warn "User with id #{current_user.id} tried to edit user with
id #{params[:id]}"
render :file => "#{RAILS_ROOT}/public/404.html"
else
Well you can specify a default page / controller action to perform for unmatched routes as well…so if the route doesn’t exist it shows a much user friendly page instead of the rails error message