Rails Has_One Association Seems Illogical, Wrong Way Around -
Sorry if this is clear. I've been using the rail for a while, but the way my association is still getting worse with my head, it has not clicked yet.
I am creating a special table that prepares a list of companies that meet certain criteria for an email mail-out, and have information about whether they have been emailed Or not, and has responded to the email (or not.)
An entry in the email - Matching table for a single company's record, it seems logical to me that each respondent records Switch to a company.
However, if I add a response model and then use responder.company, I get an error saying that I need a company responder_id in the record that does not make sense to me The company does not know anything about the respondents. I expected the respondent to have a company, because there will be no company ID in the record of the respondent, which is not otherwise. It seems that bass echad
So, obviously what I have done is not a railway, but in addition to hacking the company's law in the liability model, I am not sure what to do about it. Is there another type of SDO in the rail which I have not searched yet?
Each entry is an email / mail address table for a single company record so it is for me It seems logical that each respondent has a company in the record.
This means that there may be many defendants in a company.
Therefore, you have the Responsible Table in the
Company_id column.
and Association
class company
Therefore, each record of the respondent has a company, and one company has many respondents.
Comments
Post a Comment