app/models/message_recipient.rb in has_messages-0.1.2 vs app/models/message_recipient.rb in has_messages-0.1.3
- old
+ new
@@ -53,25 +53,29 @@
event :view do
transition :to => 'read', :from => 'unread', :if => :message_sent?
end
end
- # Forwards the message
+ # Forwards this message, including the original subject and body in the new
+ # message
def forward
message = self.message.class.new(:subject => subject, :body => body)
message.sender = receiver
message
end
- # Replies to the message
+ # Replies to this message, including the original subject and body in the new
+ # message. Only the original direct receivers are added to the reply.
def reply
message = self.message.class.new(:subject => subject, :body => body)
message.sender = receiver
message.to(sender)
message
end
- # Replies to all recipients on the message, including the original sender
+ # Replies to all recipients on this message, including the original subject
+ # and body in the new message. All receivers (sender, direct, cc, and bcc) are
+ # added to the reply.
def reply_to_all
message = reply
message.to(to - [receiver] + [sender])
message.cc(cc - [receiver])
message.bcc(bcc - [receiver])