Skip to content

Instantly share code, notes, and snippets.

@jsierles
Created June 2, 2009 21:18
Show Gist options
  • Select an option

  • Save jsierles/122601 to your computer and use it in GitHub Desktop.

Select an option

Save jsierles/122601 to your computer and use it in GitHub Desktop.
has_many :question_relations, :foreign_key => "relator_id"
has_many :related_questions, :through => :question_relations, :source => :relatee
has_many :inverse_question_relations, :class_name => "QuestionRelation", :foreign_key => "relatee_id"
has_many :inverse_related_questions, :through => :inverse_question_relations, :source => :relator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment