I'm very new to RoR, and I'm writing my first 'web app' and already I
think I need a one-to-many polymorphic join. The reason I'm writing
this is because it is causing me a real headache. After sitting at my
pc for what seems like 4 four solid days, I'm not getting anywhere.
Here's the scenario;
A user profile photo will be displayed based on which profile he/she
has selected. There are three different types.
a) Monthly photo b) Daily photo c) Specific date in year. Each of
these are all different tables because they hold slightly different
types of data.
So 'Monthly' would have at most 12 rows per user, whereas 'daily
photos' and 'specific date' tables would have an unlimited amount of
rows of data assigned to a user.
Does anyone know how best to go about to achieve this? I've tried
using the example of the polymorphic join in AWDR V2, but it seems to
be a one 2 one relationship. I can't seem to get the One 2 many to
work at all.
I suppose my question is this; Can anyone help with One to Many
polymorpphic joins before the last of my hair falls out!