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没有洪水,我怎么能得到它?