In my project, I have the following models
Content -> stores title and body text
ImageAsset -> title, description, paperclip file
ImageLinker -> to link a content with many images and vice versa, using has_many :through
The same way I have linked
FileAsset model with Content using FileLinker model
Category model with Content using Categorization model
Now first my question, is this how a good rails develop make the relationships?
second, there is one another need that the above setup doesn’t meet. i.e., There are several types of content like event, project, article, blog, receipe. And each of these content types have a need for additional set of fields in their model like event content has title, description and additionally event time and date.
My initial thought was to move to postgresql and use hstore to store the arbitrary properities based on content type. But
2a. I am not sure if this is the right approach
2b. I don’t know how I can implement it, even if this is a right approach. ANy guidance on implementing will be much helpful.