Is it possible to create one model that stands for two different objects? for example:
I have a blog, on which, I will publish articles on pure text and screencasts with only video.
With that in mind:
I want to get only all posts => @posts = Posts.all
I want to get only all screencasts=> @posts = Screencasts.all
and I want to get only all articles => @posts = Articles.all
And in the view I want to know which class is this post
<% if @posts.first is article %>
do something
<% else %>
do something else
<% end %>
if this is not possible, how can I do something like that?