...

View Full Version : Merge three models for latest content on homepage?



noisyscanner
08-16-2011, 04:12 PM
Hey, guys!
I have three models for a blog here that I want to merge to find the latest content for the homepage.

Post
Picture
Video

To make this even more complicated would like to paginate the results using will_paginate.
What I have so far is this:

@posts = Post.paginate(:order => "created_at DESC", :page => params[:page])

Can anybody think of a solution?
Thanks,
Brad. :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum