Skip to content

polymorphic type support for docs#203

Open
jasonayre wants to merge 2 commits intopraxis:masterfrom
jasonayre:master
Open

polymorphic type support for docs#203
jasonayre wants to merge 2 commits intopraxis:masterfrom
jasonayre:master

Conversation

@jasonayre
Copy link

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.

Screen Shot 2024-09-30 at 3 48 05 PM

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)

Copy link
Contributor

@blanquer blanquer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@blanquer
Copy link
Contributor

blanquer commented Oct 6, 2024

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.

@jasonayre
Copy link
Author

@blanquer added test ^

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

Successfully merging this pull request may close these issues.

2 participants