Greg Donald wrote:
> On Tue, Jul 13, 2010 at 4:25 PM, Zack Nathan <[email protected]> 
> wrote:
>> Does anyone know how I should make my models and controllers.
>> Thanks!
> 
> You probably want to use polymorphic associations.
> 
> http://guides.rubyonrails.org/association_basics.html#polymorphic-associations
> 
> 
> --
> Greg Donald
> destiney.com | gregdonald.com

hey thanks for the reply. Your right, I thought about it more and 
polymorphism is exactly what I need. However, I want a media object to 
be either a picture, a video, a sound file or a link. So that means 
links, pictures, videos and sound files have the attributes of a media 
object but are their own media. If that makes any sense?
So for example id like to be able to do: 
MediaObject.find_by_video(example_media_object.content) or something 
like that. I dont really know how to explain this in rails, but I can do 
this easily in java haha.

Thanks.
-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to