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

[Feature request] Additional relations #84

Open
kg-currenxie opened this issue Jun 15, 2021 · 0 comments
Open

[Feature request] Additional relations #84

kg-currenxie opened this issue Jun 15, 2021 · 0 comments

Comments

@kg-currenxie
Copy link

kg-currenxie commented Jun 15, 2021

Hey. I would like to access the friendship records

For example the created_at column, so I could say "John sent you a friend request 3 days ago".

At the moment I only get the user record.

This works fine in one case, like current_user.friends can be changed to current_user.friendships, and then i can serialize it nicely in api-mode:

class Api::V1::FriendshipSerializer < ActiveModel::Serializer
  attributes :id
  belongs_to :friend
end

But its missing for requested/pending/blocked. These would be nice :)

current_user.requested_friendships
current_user.pending_friendships
current_user.blocked_friendships

Thanks

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

1 participant