In Rails 3, why am I receiving a metawhere join dependency error?

Results 1 to 1 of 1
  1. #1
    Apprentice betty12 is offline
    MemberRank
    Jun 2022 Join Date
    5Posts

    In Rails 3, why am I receiving a metawhere join dependency error?

    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.




Advertisement