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

Improve Customizing Attributes documentation #3979

Merged
merged 1 commit into from
May 5, 2021

Conversation

dhughesbc
Copy link
Contributor

The documentation about how to add custom attributes to a model in not accurate. This PR updates the documentation

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

Thanks! Which is the model you are not seeing in the list?

@dhughesbc
Copy link
Contributor Author

Spree::Role

@kennyadsl
Copy link
Member

Thanks, just to be clear about why it is missing, Spree::Role doesn't have a UI in the admin currently, so there's no admin controller for that resource. I think the guide covers adding attributes to the existing UI provided by Solidus. If you are adding your own views/controllers you already have access to the new controller added and you can simply set the permitted attributes in that controller. Or maybe you are trying to do something else and I am missing something?

Anyway, I think this change is still an improvement and we should add it to the documentation.

@dhughesbc
Copy link
Contributor Author

Thanks, we are using the solidus_user_roles extension, which provides a controller and views for roles management. It was a less experienced (with Solidus) colleague of mine that got tripped up by this Solidus documentation. He added a custom attribute to the Spree::Role model and was following this documentation on how to it, but he did not realize the solidus_user_roles extension does not use the core Spree::PermittedAttributes module.

@kennyadsl kennyadsl changed the title Fix inaccurate documentation Improve Customizing Attributes documentation Mar 9, 2021
@kennyadsl kennyadsl merged commit 937a3d8 into solidusio:master May 5, 2021
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.

3 participants