Closed yasser-sobhy closed 7 years ago
@yasser-sobhy Thank you for the pull request!
I am very interested in this feature, but I think that some things would need to change with the implementation.
.has_drafts
that lets the developer decide if they're going to
have a single draft per record or multiple drafts.#draft?
back as an alias of #has_drafts?
for the single draft scenario that I mention
above..has_draftsman
back to .has_drafts
. There is no real conflict there because that
is a class-level method.There is probably some opportunity to refactor this logic into include
able modules, kind of the way that concerns work in Rails. Maybe it should be architected so that the single draft and multiple draft strategies are their own modules that mix in common logic and implement the custom bits that each needs.
If you don't have the bandwidth to make these changes, I can probably get around to it eventually. I'll be honest though: I don't need this feature myself, so I don't have much motivation myself (though again, I'd love to see support for it).
Let's discuss. Anyone, jump in.
@chrisdpeters I have cloned the latest Dratfsman with Rails 5.1 support and rewritten the changes again and separated single and multiple drafts functionality as you suggested. Have a look at my PR #71 .
Closing this in favor of #71.
Hi, I am using draftsman for a quite large project at my company, that project needs a multiple drafts functionality, unfortunately draftsman lakes for that. So I decided to support multiple drafts and push draftsman to version 1.
Changes:
To change: