search for: imagecontent

Displaying 1 result from an estimated 1 matches for "imagecontent".

2007 Oct 18
4
Polymorphic Association?
...ps between a series of models for a page creation function. What I''d like is to have a Content Page which consists of a series of Content Blocks. The Content Blocks act as a list relative to the Content Page. And each Content Block can be assigned one of 3 types of content: TextContent, ImageContent, or FileContent. So my current thinking is this: ContentPage has_many :content_blocks, :order => :position ContentBlock belongs_to :content_page acts_as_list :scope => content_page_id has_one :text_content has_one :image_content has_one :file_content TextContent belongs_to :...