I am trying to use will_paginate with group_by but i keep getting
“undefined method `total_pages’ for”.
–Controller–
@records = Record.paginate( :conditions => [‘this_id = ? and that_id =
?’,session[:this_id],session[:that_id]], :page => params[:page],:order
=> ‘created_at DESC’, :per_page => 2).group_by { |c|
c.created_at.to_date }
–view–
<% @records.each do |d, records| %>
<%= d %>
<% for r in records %>
<%= link_to r.title, :action => “action”, :id => r.id %>
<% end %>
<% end %>
<%= will_paginate @records %>
any help is greatly appreciated.