Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
test_relations.rb
# Test out a complex relation in the Rails console
t = Team.find(10004)
t.class.has_one :file, class_name: 'ProjectAsset', foreign_key: :parent_id, primary_key: :project_element_id
t.file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment