irb(main):001:0> d = OurDomains.find(3)
=> #<OurDomains:0x000000056ea410 @id="2", @internal_domains=["1.com", "2.com", "3.com"], @external_domains=["2.com"]>
Using the above response as an example, could someone give me a guide on how to compare values in the internal_domains and external_domains array please? Specially, I am interested in displaying all the values in internal_domains that corresponds to a value in external_domains in my view.html.erb; that is "2.com" in this case
d.internal_domains & d.external_domains? Intersection.