diff options
author | Henare Degan <henare.degan@gmail.com> | 2015-04-21 16:30:36 +1000 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2015-04-21 16:30:36 +1000 |
commit | 177c3c13b7eb3e34d78795f030ae7f352d3bd621 (patch) | |
tree | 63de409b68cb4ea34b2ce2710a793d23da6a7915 | |
parent | 9bef8fcfc4a17a961a4c5603c4ee71af3c9a2140 (diff) |
Remove unnecessary method
-rw-r--r-- | app/models/public_body.rb | 12 | ||||
-rw-r--r-- | spec/views/public_body/show.html.erb_spec.rb | 1 |
2 files changed, 3 insertions, 10 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index cb412f9dc..0bcb1da8c 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -577,17 +577,11 @@ class PublicBody < ActiveRecord::Base return self.request_email_domain end - # Returns nil if configuration variable not set - def override_request_email - e = AlaveteliConfiguration::override_all_public_body_request_emails - e if e != "" - end - def request_email - if override_request_email - override_request_email - else + if AlaveteliConfiguration::override_all_public_body_request_emails.blank? read_attribute(:request_email) + else + AlaveteliConfiguration::override_all_public_body_request_emails end end diff --git a/spec/views/public_body/show.html.erb_spec.rb b/spec/views/public_body/show.html.erb_spec.rb index 6ebc39caa..2a4c21d04 100644 --- a/spec/views/public_body/show.html.erb_spec.rb +++ b/spec/views/public_body/show.html.erb_spec.rb @@ -13,7 +13,6 @@ describe "public_body/show" do :publication_scheme => '', :disclosure_log => '', :calculated_home_page => '') - @pb.stub!(:override_request_email).and_return(nil) @pb.stub!(:is_requestable?).and_return(true) @pb.stub!(:special_not_requestable_reason?).and_return(false) @pb.stub!(:has_notes?).and_return(false) |