aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/raw_email.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/models/raw_email.rb b/app/models/raw_email.rb
index 4c90a20b6..3b466cb81 100644
--- a/app/models/raw_email.rb
+++ b/app/models/raw_email.rb
@@ -17,7 +17,6 @@ class RawEmail < ActiveRecord::Base
has_one :incoming_message
def directory
- request_id = incoming_message.info_request.id.to_s
if request_id.empty?
raise "Failed to find the id number of the associated request: has it been saved?"
end
@@ -31,7 +30,6 @@ class RawEmail < ActiveRecord::Base
end
def filepath
- incoming_message_id = incoming_message.id.to_s
if incoming_message_id.empty?
raise "Failed to find the id number of the associated incoming message: has it been saved?"
end
@@ -52,6 +50,13 @@ class RawEmail < ActiveRecord::Base
File.delete(filepath)
end
-end
+ private
+ def request_id
+ incoming_message.info_request.id.to_s
+ end
+ def incoming_message_id
+ incoming_message.id.to_s
+ end
+end