On Wed, 24 Oct 2018 at 23:21, John Sanderbeck wrote:
> One question though... For a through association, I have to have a join
> table for the association.
>
No, if you say
Reason has_many :data_entries, :through: :assessment
then since you already have reason belongs_to assessment so if you
One question though... For a through association, I have to have a join
table for the association.
So since I want Assessment to be my parent, should I do a join like this?
Create a data_entry table and a data_records join table and then have the
association be
assessment
has_many
Certainly you only need to specify the associations you need to use.
Colin
On Wed, 24 Oct 2018 at 14:44, John Sanderbeck wrote:
>
> Hmmm... That may work...
>
> I would always be accessing assessment.data_entries for any lists or views.
> Reasons and Consequences are basically select criteria
Hmmm... That may work...
I would always be accessing assessment.data_entries for any lists or views.
Reasons and Consequences are basically select criteria for each data entry.
I would never reference reason.data_entries or consequence.data_entries
a has_many :data_entries, :through:
4 matches
Mail list logo