I get the following metawhere join dependency error:
Code:
[COLOR=var(--highlight-keyword)]@companies_user = Company.joins([/COLOR][COLOR=var(--highlight-keyword)]:contact[/COLOR][COLOR=var(--highlight-keyword)]).where([/COLOR][COLOR=var(--highlight-keyword)]:contact => {:user_id => current_user.[COLOR=var(--highlight-literal)]id[/COLOR]}[/COLOR][COLOR=var(--highlight-keyword)]).uniq[/COLOR]
The company has several contacts. In other words, every Contact has a company id method.I only want to show companies where the contacts have the same user id as the user doing the search. Also, I'm getting confuse between the relation of 5NF and Join Dependency. I read this article online and saw their example but I'm still confuse.