Skip to content

Instantly share code, notes, and snippets.

@kineticac
Created July 12, 2011 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kineticac/1079109 to your computer and use it in GitHub Desktop.
Save kineticac/1079109 to your computer and use it in GitHub Desktop.
eager loaded coaches go into an array
@coaches = bookmarks.map{|bookmark| bookmark.coach} + connections.map{|connection| connection.coach}
@interested_coaches = Coach.unique(@coaches) # I created a custom unique handler for Coach objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment