aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-11-15 09:07:09 +0000
committerLouise Crow <louise.crow@gmail.com>2012-11-15 09:07:09 +0000
commit5e96f931f0fb27029a8b4071e32f85cde5bcde5e (patch)
tree63dafee4a068592fa2b18f8edc5d298412304dd1 /app/models
parent563bcfc3d0cb743f84a1541e59ea51db04ca179f (diff)
Add wrapper method so that admin_request_controller doesn't access mail object directly.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 60828e179..cfa0d59da 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -85,6 +85,10 @@ class IncomingMessage < ActiveRecord::Base
@mail
end
+ def from_address
+ self.mail.from_addrs[0].address
+ end
+
# Returns the name of the person the incoming message is from, or nil if
# there isn't one or if there is only an email address. XXX can probably
# remove from_name_if_present (which is a monkey patch) by just calling