hi guys

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

I also suspect that you want that <%= will_paginate @books %> line
before the for loop.

<% for book in @books %>

<%=h [book.publisher.name](http://book.publisher.name/) %> <%=h book.title %> <%=h book.isbn %> <%end%>

<%= will_paginate @books %>

Thanks to all , i found the answer that
<% @books.each do |book| %>
  <tr>
    <td><%=h book.publisher.name %></td>
    <td><%=h book.title %></td>
    <td><%=h book.isbn %></td>

its working.......