1
數據庫我不能從數據庫中獲得乾淨的結果,選擇在Rails3中
module PagesHelper
def list
wishes = WishList.select("content").where("user_id = #{@user.id}")
wishes.each do |wish|
puts wish.fetch_hash
end
end
end
結果與用戶ID爲6:
[#<WishList content: "test3">, #<WishList content: "test4">, #<WishList content: "test5">]
,但我想列表,如: TEST3, test4,test5沒有洪水,我怎麼能得到它?