Skip to content

Instantly share code, notes, and snippets.

@Insti
Created May 26, 2017 17:53
Show Gist options
  • Save Insti/c1a8b77da5a950966e24bd75a51bba42 to your computer and use it in GitHub Desktop.
Save Insti/c1a8b77da5a950966e24bd75a51bba42 to your computer and use it in GitHub Desktop.
Users who are track mentors
> User.all.reject { |user| user.track_mentor.empty? }.map { |user| [user.username, user.track_mentor] }
=> [["diana", ["python"]],
["bob", ["ruby", "haskell"]],
["charlie", ["javascript", "erlang", "elixir"]],
["alice",
["clojure",
"coffeescript",
"elixir",
"go",
"haskell",
"javascript",
"objective-c",
"ocaml",
"perl5",
"python",
"ruby",
"scala"]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment