Considering the following resources with their corresponding relationships:
Site
has_many :page
has_many :groups
has_many :projects
Group
belongs_to :site
has_many :pages
Project
belongs_to :site
has_many :pages
Is it good to make Page model polymorphic or leave individual foreign keys?
**Scenario 1 (Polymorphic)**
Page
pageable_id
pageable_type
title
body
....
....
**Scenario 2 (Non Polymorphic)**
Page
site_id (always filled)
group_id (may be empty)
project_id (may be empty)
title
body
....
....
**Scenario 3 (Combination)**
Page
site_id
pageable_id (may be empty, if page belongs only to site)
pageable_type (may be empty, if page belongs only to site)
title
body
.....
.....
Which one of the above 3 scenarios would you prefer? And Why (in terms of efficiency, etc..)
Note: In my views, I will be traversing through all the possible relationships of the page to show the relevant links (for example: if the page belongs to group, I show the back to group link, ...)