diff options
author | Francis Irving <francis@mysociety.org> | 2010-10-04 01:42:47 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-10-04 01:42:47 +0100 |
commit | e86c8fbc7a3f18e31ef751236b5ba439b33eafb6 (patch) | |
tree | 33436dff766a19e80709ae3d3e0773bcd8d18ed1 /app/models | |
parent | 9870707e24a4dd5d1c931256d6e85ee042e540fc (diff) |
Option to set body without setting salutation.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/outgoing_message.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index aff4f5a76..6f6ce811e 100644 --- a/app/models/outgoing_message.rb +++ b/app/models/outgoing_message.rb @@ -39,6 +39,9 @@ class OutgoingMessage < ActiveRecord::Base # contact address changed has_many :info_request_events + # To override the default letter + attr_accessor :default_letter + # reindex if body text is edited (e.g. by admin interface) after_update :xapian_reindex_after_update def xapian_reindex_after_update @@ -70,6 +73,10 @@ class OutgoingMessage < ActiveRecord::Base return "GIVE DETAILS ABOUT YOUR COMPLAINT HERE" end def get_default_letter + if self.default_letter + return self.default_letter + end + if self.what_doing == 'internal_review' "Please pass this on to the person who conducts Freedom of Information reviews." + "\n\n" + |