diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-06-03 18:09:41 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-06-15 16:11:13 +0100 |
commit | f13d65793824e6d9e7dc14c91582a347c996525d (patch) | |
tree | ccd08d24cfcf4e78eb0c1bf70b8fbf850c8fe0ab | |
parent | 546f60295da780dfe0e6fa85b918d39c47852322 (diff) |
Use alias_method to define duplicate method
-rw-r--r-- | app/models/public_body.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 50677f892..91ee9fd77 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -508,10 +508,6 @@ class PublicBody < ActiveRecord::Base our_domain == user_domain end - def foi_officer_domain_required - request_email_domain - end - def request_email if AlaveteliConfiguration::override_all_public_body_request_emails.blank? || read_attribute(:request_email).blank? read_attribute(:request_email) @@ -525,6 +521,8 @@ class PublicBody < ActiveRecord::Base PublicBody.extract_domain_from_email(request_email) end + alias_method :foi_officer_domain_required, :request_email_domain + # Return the domain part of an email address, canonicalised and with common # extra UK Government server name parts removed. def self.extract_domain_from_email(email) |