0
當我在視圖中迭代對象時,它也渲染對象本身。Rails - 查看對象迭代問題
我:
@portfolio_queued = Artist.where(:state => 'portfolio_queued')
和:
= for artist in @portfolio_queued
%p
= "#{artist.name}"
%br
= "#{artist.state}"
而且它的渲染:
mauko
portfolio_queued
quiroga
portfolio_queued
quiroga
portfolio_queued
#<Artist:0x10652ca90>#<Artist:0x1065296b0>#<Artist:0x106529340>
任何幫助嗎?
當使用「=」渲染輸出時,所以我用「 - 」代替它。 – maukoquiroga 2011-01-23 23:38:19