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| %>
<b><%= d %></b>
<% for r in records %>
<p><%= link_to r.title, :action => "action", :id =>
r.id %></p>
<% end %>
<% end %>
<%= will_paginate @records %>
any help is greatly appreciated.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---