Topic: pagination in netbeans 6.9.1

I have been using netbeans 6.9.1 to develop a forum using RoR. I'm  getting error called 'undefined method paginte'. Later i installed the plugin/gem will_paginate. But still the error is coming.

Any idea why this is happening

Re: pagination in netbeans 6.9.1

First, I thing you have a typo in the method name:

I'm  getting error called 'undefined method paginte'.

It should paginate and not paginte. Check that in you code wher you are calling the method>
Second if everything seems to you OK, check that you call the paginate method correctly in the controller:

@your_model_instances= YourModel.paginate :page => params[:page], :conditions=>...,  'some_conditions', :order => 'some attribute, :per_page => your_preferred_number

The same, check the view where you use the pagination:

<% for you_model_instance in @your_model_instances %>
...loop on and display whatever you want here
    <% end %>
 <%= will_paginate @your_model_instances %>

Last edited by Javix (2011-05-23 08:16:33)