You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are scenarios where it makes sense to stash drafted data and require reification to get it back. And #51 could potentially make it more performant in most situations.
There are other scenarios where you may be creating a service that is only concerned with drafted data, so reification is not required or necessary. I'm finding myself in that situation with my current project, and I'd imagine that others would too.
This could be done via a setting or by simply removing the object column from the database. I am open to comments about which would be more appropriate. I'm leaning toward making it an explicit setting so that the intention is documented somewhere in the application's source code.
Add Draftsman.stash_drafted_changes config option
Add to generator
Apply new logic to Model#save_draft method
Apply new logic to Draft#reify method
Apply new logic to Draft#publish! method
Apply new logic to Draft#revert! method
Apply new logic to Model#draft_destruction - delete record entirely and stash it in Draft
Update documentation
The text was updated successfully, but these errors were encountered:
I had added an item to have the new stash_drafted_changes setting affect #draft_destruction, and I just don't think that'll work out. Unfortunately, reverting a draft like that would make it difficult (if not impossible) to restore related records with foreign keys and such. The original record needs to be there until it's deleted for good.
There are scenarios where it makes sense to stash drafted data and require reification to get it back. And #51 could potentially make it more performant in most situations.
There are other scenarios where you may be creating a service that is only concerned with drafted data, so reification is not required or necessary. I'm finding myself in that situation with my current project, and I'd imagine that others would too.
This could be done via a setting or by simply removing the
object
column from the database. I am open to comments about which would be more appropriate. I'm leaning toward making it an explicit setting so that the intention is documented somewhere in the application's source code.Draftsman.stash_drafted_changes
config optionModel#save_draft
methodDraft#reify
methodDraft#publish!
methodDraft#revert!
methodModel#draft_destruction
- delete record entirely and stash it inDraft
The text was updated successfully, but these errors were encountered: