Created
January 4, 2012 16:05
-
-
Save oslego/1560701 to your computer and use it in GitHub Desktop.
Related Lists
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
class List < ActiveRecord::Base | |
has_many :related_lists, :finder_sql => 'SELECT * FROM related_lists WHERE list_a_id = #{id} OR list_b_id = #{id}' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment