Paging in ror

hello all,

any one known how to do paging in ror

Wap A. 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 %>

Rails L. wrote:

Wap A. 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

Listing images

<% for image in @images %>

<% end %>
Name
<%=h image.name %> <%= image_tag image.name,:alt =>image.name,:size=>'100x100'%> <%= link_to 'Show', image %> <%= link_to 'Edit', edit_image_path(image) %> <%= link_to 'Destroy', image, :confirm => 'Are you sure?', :method => :delete %>

<% will_paginate @images %> <%= link_to 'New image', new_image_path %>

Hi

please read the example usage here at home

Sijo