-
Notifications
You must be signed in to change notification settings - Fork 62
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 documentation for use with associations #84
Comments
You mean edit a tag and make that tag a draft? If that that is the case, you should make Tag draftable:
You can then draft and publish Tags. If that is not the case, please clarify. |
@jmfederico thanks for the suggestion, that makes sense. Do the |
When you publish a child, and the parent is new (never published), the parent also gets published. |
Publishing the parent does not publish the child. |
@jmfederico 👍 thanks, that makes a great deal of sense. Let's imagine I have a many-to-many association (has_many :through), such as, tags -> taggings -> posts. Where tags already existing, but I want to 'draft' the assignment of them to any given blog post. I presume I would add draftsman to the join model? And then I can draft and publish the links, and perhaps cleanup before publishing to remove previously published associations? |
Great gem folks 👍
However, I'm struggling a little to see how to work this with draft associations, and I think it's something which could perhaps be covered in the documentation?
Let's say I have a draftable blog post, and a post can have various tags associated with it.
Drafting changes to the blog post in isolation is simple enough, I can change it's title, or correct some typos in it's content, that's working just lovely.
However, what if I want to change the tags associated with my blog post?. How can I make those association changes 'draft' rather than immediate?
How would model/controller code look in a scenario like that?
If someone can help me understand, I'm happy to wrap up a PR to improve the README around this.
The text was updated successfully, but these errors were encountered: