On 18 March 2010 16:33, Grick Zh <[email protected]> wrote: > <%=h @posts.each {|p| p.name} %> > > why this code return serial strings like #<Post:0x3a893e8> ?
Because you're outputting the return value of the whole loop, not the output of each block. If you run that command in your console, you will see it return an array of Posts; and that's what you're trying to render. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

