Created
June 24, 2011 17:15
-
-
Save phlipper/1045229 to your computer and use it in GitHub Desktop.
event -> perspective -> attachment chain
This file contains hidden or 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
@events = Event.all | |
for event in @events | |
# event has_many perspectives | |
for perspective in event.perspectives | |
# perspective has_many attachments | |
for attachment in perspective.attachments | |
# attachment has an asset with an url | |
puts attachment.asset.url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment