diff options
author | francis <francis> | 2008-09-24 19:43:21 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-24 19:43:21 +0000 |
commit | 7764a7e70546d81dd2ec295f3a8a8017d38a15b9 (patch) | |
tree | 9bf21449754594a06554b26757bf889ab0f91603 /app/controllers/admin_request_controller.rb | |
parent | 681b15b2c11aeaaa7f508d13738368f3c39821f4 (diff) |
'Doh
Diffstat (limited to 'app/controllers/admin_request_controller.rb')
-rw-r--r-- | app/controllers/admin_request_controller.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb index ae244797c..446b5263c 100644 --- a/app/controllers/admin_request_controller.rb +++ b/app/controllers/admin_request_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: admin_request_controller.rb,v 1.22 2008-09-24 19:42:50 francis Exp $ +# $Id: admin_request_controller.rb,v 1.23 2008-09-24 19:43:21 francis Exp $ class AdminRequestController < ApplicationController layout "admin" @@ -211,13 +211,12 @@ class AdminRequestController < ApplicationController @holding_pen = true email = @raw_email.incoming_message.mail.from_addrs[0].spec - user_domain = email - user_domain =~ /@(.*)/ - user_domain = $1 - user_domain = 'localhost' + domain = email + domain =~ /@(.*)/ + domain = $1 @public_bodies = PublicBody.find(:all, :order => "name", - :conditions => [ "lower(request_email) like lower('%'||?||'%')", user_domain ]) + :conditions => [ "lower(request_email) like lower('%'||?||'%')", domain ]) end end |