Closed aximuseng closed 3 years ago
Does this exist in the existing code somewhere?
If not is there an appetite to add this?
No, we try to keep the maintenance overhead as low as possible so I don't think this is something we want to support. Thanks for checking!
No worries - figured I would ask first. I think I may just roll my own Module etc to add this where needed. Right now I am just adding these manually.
I am using https://github.com/jsonapi-serializer/jsonapi-serializer for an API in my app. I want to use my Friendly IDs to hide the actual DB id.
In the json gem you can call a custom method to get the ids of the relationship. It's an extension of something like this:
It looks to me that there is no Friendly id equivalent like:
Does this exist in the existing code somewhere?
If not is there an appetite to add this?
I can add these custom methods in all my models but having this built in to Friendly ID would be better.
It seems as 'easy' as adding:
relationship_name.pluck(:slug_column_name)