Hello, i have some issue with database.
Okay, i have two models -> Page
and Item
.
Page for displaying some content.
Item
-> this is item discription.
So, i work on small ecommerce shop
.
Okay, all of this models can have some comments.
So, this is my Comments model at this moment:
Comments ->
string : id
text : body
integer : page_id
integer : item_id
So when some one add comment to page -> page_id will be filled with current Page id.
And if some one add comment to item -> item_id will be filled.
Okay, i know what the best way is to create STI
or Polymorphic
assoc, but does i really need this way for my situation?
Sorry for my bad english, i'm from Russia.=)