Ruby on Rails
Tuesday, August 30, 2011
I have Titles and People, and I want a single Image class that can
apply to either. I'm reading the Rails API on Polymorphic
Associations, and I'm getting confused by the example. Can anyone
explain how to do this:
Title
has_many :images
Person
has_many :images
Image
belongs_to [either :image or :title]
Thanks very much in advance,
Walter
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment