diff --git a/models/email_reply.rb b/models/email_reply.rb index 5caa9aa..17b9dbb 100644 --- a/models/email_reply.rb +++ b/models/email_reply.rb @@ -1,2 +1,5 @@ class EmailReply < ActiveRecord::Base + def in_reply_to_twitter_url + "http://twitter.com/#{in_reply_to_screen_name}/status/#{in_reply_to_status_id}" + end end diff --git a/views/emails/show.haml b/views/emails/show.haml index 05a34c6..2ee5389 100644 --- a/views/emails/show.haml +++ b/views/emails/show.haml @@ -2,4 +2,7 @@ %p Subject: #{@email.subject} %p= @email.stripped_text %p - This email was in reply to a tweet + This email was in reply to + %a{:href => @email.in_reply_to_twitter_url} + a tweet + from @#{@email.in_reply_to_screen_name}