Pretty sure that I\'m missing something really simple here:
I\'m trying to display a series of pages that contain instances of two different models - Profiles and Gr
You can get close doing something like:
@profiles, @groups = [Profile, Group].map do |clazz|
clazz.paginate(:page => params[clazz.to_s.downcase + "_page"], :order => 'name')
end
That will then paginate using page parameters profile_page and group_page. You can get the will_paginate call in the view to use the correct page using:
<%= will_paginate @profiles, :page_param => 'profile_page' %>
....
<%= will_paginate @groups, :page_param => 'group_page' %>
Still, I'm not sure there's a huge benefit over setting up @groups and @profiles individually.