amistad icon indicating copy to clipboard operation
amistad copied to clipboard

Multiple friendship models

Open tuykin opened this issue 10 years ago • 2 comments

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?

tuykin avatar Jan 05 '15 16:01 tuykin

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

raw1z avatar Jan 05 '15 16:01 raw1z

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?

tuykin avatar Jan 05 '15 23:01 tuykin