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**** <input type="text" value="Re: <%= @message.subject %>"> ************************* My problem is how do I stop the Re: building up when I save it to the database. I dont want this Re: Re: Re: Re: Any Ideas how this could be done? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Scott Holland
2007-Jan-29 16:34 UTC
Re: Putting "RE:" in the subject line of Private Messages
obviously I meant ***message_reply.rhtml**** -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jakob Skjerning
2007-Jan-30 14:21 UTC
Re: Putting "RE:" in the subject line of Private Messages
Scott Holland 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.[...]> <input type="text" value="Re: <%= @message.subject %>">[...]> 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 Skjerning - http://mentalized.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---