Skip to content

Instantly share code, notes, and snippets.

@libryder
Created January 19, 2013 15:06
Show Gist options
  • Save libryder/6543b83975e572f2823d to your computer and use it in GitHub Desktop.
Save libryder/6543b83975e572f2823d to your computer and use it in GitHub Desktop.
[29] pry(#<User>)> solutions.each { |s| puts s.up_votes.count }
1
=> [#<Solution id: 1, solution_url: nil, challenge_id: 1, user_id: 2, valid_solution: nil, created_at: "2013-01-19 14:51:04", updated_at: "2013-01-19 14:51:04", source: "Sample solution notes", title: "Some random title", language: "ruby", popularity: 2>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment