aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2012-09-27 15:42:49 +1000
committerMatthew Landauer <matthew@openaustralia.org>2012-09-27 15:44:10 +1000
commit7a9593a37ee94dc88fb9199d51f4b2e85418ec49 (patch)
tree507c0d01a3d347ba8b18ff057de7fab201bc61fa /app/models
parent49fb299dde57e7db981ef31a7da12c6fd4761b01 (diff)
Extract method
Diffstat (limited to 'app/models')
-rw-r--r--app/models/public_body.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index 1c1ddb377..d1ed74110 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -509,10 +509,13 @@ class PublicBody < ActiveRecord::Base
return self.request_email_domain
end
+ def override_request_email
+ MySociety::Config.get("OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS", "")
+ end
+
def request_email
- override_email = MySociety::Config.get("OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS", "")
- if override_email != ""
- override_email
+ if override_request_email != ""
+ override_request_email
else
read_attribute(:request_email)
end