<% for book in @books %> <tr> <td><%=h book.publisher.name %></td> <td><%=h book.title %></td> <td><%=h book.isbn %></td> <%end%>
<%= will_paginate @books %> On Mon, Jan 17, 2011 at 5:28 PM, Peter Hickman < [email protected]> wrote: > I also suspect that you want that <%= will_paginate @books %> line > before the for loop. > > On 17 January 2011 11:55, Frederick Cheung <[email protected]> > wrote: > > > > > > On Jan 17, 5:41 am, selva raj <[email protected]> wrote: > >> i got an error , > >> undefined method `each' > >> and i am using the following code > >> > >> <% for book in @books do %> > >> <%= will_paginate @books %> > >> <tr> > >> <td><%=h book.publisher.name %></td> > >> <td><%=h book.title %></td> > >> <td><%=h book.isbn %></td> > >> > >> please help me > >> Thanks. > > > > Hard to say but probably means that @books isn't an enumerable > > collection (such as an array) > > > > Fred > > > > -- > > 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]<rubyonrails-talk%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > > > -- > 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]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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.

