Skip to content

Instantly share code, notes, and snippets.

@kineticac
Created July 12, 2011 22:16
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/1079116 to your computer and use it in GitHub Desktop.
Save kineticac/1079116 to your computer and use it in GitHub Desktop.
## coach.rb
attr_accessor :interested_at
## athletes_controller.rb
coach_bookmarks = bookmarks.map do |bookmark|
coach = bookmark.coach
coach.interested_at = bookmark.created_at
coach
end
coach_connections = connections.map do |connection|
coach = connection.coach
coach.interested_at = connection.created_at
coach
end
@interested_coaches = Coach.unique(coach_bookmarks + coach_connections)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment