Add GlobalId::Identification::build_global_id#186
Add GlobalId::Identification::build_global_id#186shetty-tejas wants to merge 7 commits intorails:mainfrom
Conversation
|
Can't wait to this merged ! Another use case I'm facing: populate a select/options without ajax with a lot of options of mixed models. |
rafaelfranca
left a comment
There was a problem hiding this comment.
I get the idea but I don't like this implementation. First, it doesn't have the signed counterpart. Second, it is duplication a lot of code with GlobalID.create, so we will probably end up changing one and forgetting to change the other.
|
Hey @rafaelfranca! Thanks for reviewing the code. I have fixed the code to reuse the existing logic, while also adding the signed counterpart. You can let me know your thoughts about the current iteration :) P.S: The tests that are failing seem to be something related to Rails 8, and not due to the code in this PR. |
Inspired from #181.
This PR aims to add a class method to the models that'd give an ability build your own GlobalIDs
Example: