aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/outgoing_message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/outgoing_message.rb')
-rw-r--r--app/models/outgoing_message.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index 20e2d33ec..0d959cb25 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -21,7 +21,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: outgoing_message.rb,v 1.38 2008-03-21 14:45:38 francis Exp $
+# $Id: outgoing_message.rb,v 1.39 2008-03-31 17:20:59 francis Exp $
class OutgoingMessage < ActiveRecord::Base
belongs_to :info_request
@@ -32,11 +32,6 @@ class OutgoingMessage < ActiveRecord::Base
belongs_to :incoming_message_followup, :foreign_key => 'incoming_message_followup_id', :class_name => 'IncomingMessage'
- acts_as_solr :fields => [
- :body,
- { :created_at => :date }
- ], :if => "$do_solr_index"
-
# How the default letter starts and ends
def get_salutation
ret = "Dear "
@@ -55,6 +50,12 @@ class OutgoingMessage < ActiveRecord::Base
end
end
+ def body_without_salutation
+ ret = self.body
+ ret.sub!(/Dear .+,/, "")
+ return ret
+ end
+
# Set default letter
def after_initialize
if self.body.nil?