What does the generated source code look like? I'm guessing the value of "message.chid" might be messing up the HTML.
Also, have you considered using "link_to_function" instead of using "link_to". Might clean up your code a little bit.* * -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.