Skip to content

Instantly share code, notes, and snippets.

@bruschill
Last active November 29, 2015 00:17
Show Gist options
  • Save bruschill/2662d72b85ae3695a28e to your computer and use it in GitHub Desktop.
Save bruschill/2662d72b85ae3695a28e to your computer and use it in GitHub Desktop.
# Challenge.find(1).difficulty.name
# think of the dots as steps
# step 1...
Challenge.find(1) #=> my_challenge
# step 2...
my_challenge.difficulty #=> my_challenge's difficulty
# step 3...
puts my_challenge_difficulty.name #=> 'easy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment