Hey, This is sort of complicated, and I''m trying to keep it as simple as I can. I''m using will_paginate to display only 25 snapshots on each page. My question is how can I return only the most recent snapshot per link (just one per link)? @snapshots = Snapshot.paginate :order => ''snapshots.weighted_score desc'', :conditions => ["snapshots.scenario_id = ? and (links.status = 1 or links.status = 2 or links.status = 4)", @scenario.id], :include => [:page, :link, {:snapshot_attributes => :attribute}], :page => params[:page], :per_page => 25 Let me know if any other information is needed, and thanks for any advice. -- 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 -~----------~----~----~----~------~----~------~--~---