Skip to content

Instantly share code, notes, and snippets.

@oojikoo-gist
Created February 12, 2015 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oojikoo-gist/1e92947267d83c828f95 to your computer and use it in GitHub Desktop.
Save oojikoo-gist/1e92947267d83c828f95 to your computer and use it in GitHub Desktop.
rails: custom association on a model
belongs_to :primary_status, :model => 'Status', :foreign_key => 'primary_status_id'
belongs_to :secondary_status, :model => 'Status', :foreign_key => 'secondary_status_id'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment