2010-10-04 27 views

回答

2

正好連接兩個字符串:

<%=f.text_area :content, :id=> ('comment_content_' + commentable.id.to_s) %> 
+0

謝謝,工作很好! – WozPoz 2010-10-04 03:54:11

0

正如你所替代任何其他字符串。 :)

<%= f.text_area :content, :id=> "comment_content_#{commentable.id}" %> 
相關問題