I have two models, Campaigns and Orders
I would like to find a specific campaign with it orders and print all emails.
I tried this in the console but get all the orders data when I only want the row :email
Campaign.find_by_id(46).orders(:email)
How to print only the emails of those orders?
Try this
This will return an array of emails of orders with specific email
Hope this helps!