Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple friendship models #53

Open
tuykin opened this issue Jan 5, 2015 · 2 comments
Open

Multiple friendship models #53

tuykin opened this issue Jan 5, 2015 · 2 comments

Comments

@tuykin
Copy link

tuykin commented Jan 5, 2015

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
Copy link
Owner

raw1z commented Jan 5, 2015

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

@tuykin
Copy link
Author

tuykin commented Jan 5, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants