Open
Conversation
blanquer
requested changes
Oct 6, 2024
Contributor
blanquer
left a comment
There was a problem hiding this comment.
The code looks good to me, thank you. (Polymorphic types is not something that I am aware is used a lot, but it is good to have it covered).
Would you mind adding a quick, simple test for it?
Contributor
|
Also, regarding docs. It is not much, but there is a little bit of documentation and videos in the wiki part of the repo: https://github.com/praxis/attributor/wiki It's quite old, but I believe it is both relevant, and accurate still. |
Author
|
@blanquer added test ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make polymorphic types show up in the docs as "one of", with the select switching between the type attributes and what not. haven't had time to write tests but, screenshot that it's working below. also integration tested fetching and creating and what not. - works nested in polymorphic as well.
would love more documentation for attributor btw :) - I went down a bunch of different failed rabbit holes initially because I missed how to do some pretty basic attributor stuff (and the whole polymorphics.rb file in spec/support, which made me realize I could declare things inline and generic types as models)