0
我在RJS下面的代碼:RJS - 紅寶石環路內page.alert
if @books_by_author.count != 0
page.alert("The following books reference the author you want to delete: \n
# here i want to list all the books referencing the author
");
end
我如何遍歷@books_by_author並顯示page.alert內他們的名字?
感謝您的寶貴幫助
或者如果他們是我會建議做的對象:@ books_by_author.collect {| x | x.title} .join(「\ n」) – Ultimation 2012-07-23 14:36:35
非常感謝:) – Kim 2012-07-23 14:37:20