Putting "RE:" in the subject line of Private Messages


#1

Hey guys,

My app has a private messaging system and I need to be able to put “Re:”
in the subject line when a user replies to a message.

Something like this…

message_reply.html*


My problem is how do I stop the “Re:” building up when I save it to the
database.

I don’t want this …

Re: Re: Re: Re:

Any Ideas how this could be done?


#2

obviously I meant

message_reply.rhtml*


#3

Scott H. wrote:

My app has a private messaging system and I need to be able to put “Re:”
in the subject line when a user replies to a message.
[…]

[…]
My problem is how do I stop the “Re:” building up when I save it to the
database.

In the above case it could be done with something like:

<%= 'Re: ’ unless @message.subject.starts_with?(‘Re:’) %>

But it strikes me as something that’s better placed in the model, not
the UI.


Jakob S. - http://mentalized.net