i got an error ,
undefined method `each’
and i am using the following code
<% for book in @books do %>
<%= will_paginate @books %>
please help me
Thanks.
i got an error ,
undefined method `each’
and i am using the following code
<% for book in @books do %>
<%= will_paginate @books %>
please help me
Thanks.
On Jan 17, 5:41am, selva raj [email protected] wrote:
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 %>
<%= will_paginate @books %>
On Mon, Jan 17, 2011 at 5:28 PM, Peter H. <
Thanks to all , i found the answer that
<% @books.each do |book| %>
its working…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs