Skip to content

Instantly share code, notes, and snippets.

@manicExpressive
Created July 9, 2015 14:41
Show Gist options
  • Save manicExpressive/e829e2682d705801f2bd to your computer and use it in GitHub Desktop.
Save manicExpressive/e829e2682d705801f2bd to your computer and use it in GitHub Desktop.
irb(main):010:0> Channel.where(owner: u).count
=> 3
irb(main):011:0> Channel.where(owner: u).each do |c|
irb(main):012:1* puts c.owner.email
irb(main):013:1> end
[email protected]
[email protected]
[email protected]
=> [#<Channel uuid: "2318e107-ce7a-468a-85ee-83b0a8f2ce9a", description: nil, members_can_post: false, name: "Third thread">, #<Channel uuid: "e5ae5b3c-d3d7-4809-b074-400fb9877b56", description: nil, members_can_post: false, name: "Fourth Thread">, #<Channel uuid: "28ce4436-f86a-4cd5-a982-8c30f9242001", description: nil, members_can_post: false, name: "Fifth Trhead">]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment