Rails List wrote:> Wap Addon wrote:
>> hello all,
>> 
>> any one known how to do paging in ror
> 
> there is a wonderful plugin called "will_paginate".  Installation
is
> simple,
> 
> 1. copy the plugin to your plugin folder.
> 2. use - require "will_paginate" in your environment.rb
> 
> start using it in your view like this
> 
> view:
> -----
> for c in @collection
> 
> end
> 
> <% will_paginate @collection %>
i was followed your step but i got will_paginate undefined method 
`will_paginate'' for #<ActionView::Base:0x46d0098> my code is
below
<h1>Listing images</h1>
<table>
  <tr>
    <th>Name</th>
  </tr>
<% for image in @images %>
  <tr>
    <td><%=h image.name %></td>
  <td><%= image_tag image.name,:alt
=>image.name,:size=>''100x100''%></td>
    <td><%= link_to ''Show'', image %></td>
    <td><%= link_to ''Edit'', edit_image_path(image)
%></td>
    <td><%= link_to ''Destroy'', image, :confirm =>
''Are you sure?'',
:method => :delete %></td>
  </tr>
<% end %>
</table>
<br />
<% will_paginate @images %>
<%= link_to ''New image'', new_image_path %>
-- 
Posted via http://www.ruby-forum.com/.