raw1z / amistad

Adds friendships management into a rails application
http://github.com/raw1z/amistad
MIT License
185 stars 71 forks source link

Multiple friendship models #53

Open tuykin opened 9 years ago

tuykin commented 9 years ago

Hello! I really liked using your gem. In my project I have 2 models, where I want to use friendship. Is there the way to do so?

raw1z commented 9 years ago

Hi I don't understand what you're trying to do. Can you give more details ?

tuykin commented 9 years ago

I have two models: Person, that has friends (through friendships) Organization, that has partners (through partnerships)

The behaviour of partnership is the same as friendship. And I wanted to to something like

class Person < ActiveRecord::Base  
  include Amistad::FriendModel
end

class Organization < ActiveRecord::Base  
  include Amistad::FriendModel
end

Or maybe

include Amistad::PersonFriendModel
include Amistad::OrganizationFriendModel

Is it possible with amistad gem?