= Has(AndBelongsTo)ManyRelated Has(AndBelongsTo)ManyRelated is Rails plugin that associates a class with itself via an intermediate join table, extending the original has_and_belongs_to_many with symmetric associations. == Installation Install it into your Rails project via script/plugin: script/plugin install http://hasmanyrelated.rubyforge.org/svn/trunk/has_many_related == Example Assuming you have a join table with columns "user_id" and "friend_id": class User < ActiveRecord::Base has_many_related :friends, :foreign_key => 'friend_id' end Let's create some users: jan = User.create marc = User.create Association is symmetric, so if Marc is Jan's friend, Jan is Marc's friend too: jan.friends << marc marc.friends.include? jan # true marc.friends.clear jan.friends.include? marc # false == License Released under the MIT license. == Authors * Guillaume Dufloux