Created
February 6, 2018 15:52
-
-
Save gabidavila/5472cf789b94d4575d2be60bdba9d433 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
users = User.all | |
users.each do |user| | |
puts "Name #{user.name}" | |
puts "Addresses: " | |
user.addresses.each do |address| | |
puts address.street | |
puts "#{address.city} - #{address.state}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment