I am working in rails 2.. I have a doubt.
In my application , i have 3 models like
Blog, Wiki , Media
I am trying to create an array like @final with all the blogs , wikis, medias posted under my application .
I have tried with
@blogs = Blog.all
@wikis = Wiki.all
@medias = Media.all
@final = []
@final << @blogs << @wikis << @medias
The above final array has 3 arrays in it..
But i am expecting to keep final array with the objects returned from 3 models
How to do so ?? PLease give suggestions
EDIT
I thing i tried is
@final = []
@blogs = Blog.all
@wikis = Wiki.all
@medias = Media.all
@final = @blogs + @wikis + @medias
This is performing exactly what i need .. But its just listing all the blogs , medias and wikis. How to list all the entities based on the creation date of the particular object
order('created_on')...)