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
I posed a question to @npafundi here in #47. I've since merged into master so I can work on some other features without an awful merge conflict.
Let's go ahead and have the discussion and track progress with callbacks in this issue.
Here is the question:
@npafundi I think that this is a good move for the API of this gem. It is a little confusing knowing when to call #draft_creation vs. #draft_update.
However, this could potentially affect how we do callbacks. If drafting behavior is moved into a single method, I'm not convinced that it would be clear to users of this gem when *_draft_creation vs. *_draft_update callbacks would be triggered. I think it's a little ambiguous: is before_draft_creation called when a draft record is being first created? Or is it when the item is created? See what I mean?
So I must ask, which of the callbacks are you using right now? Would you miss anything if I removed the ambiguous ones and created more general before_save_draft, after_save_draft, and around_save_draft callbacks?
The text was updated successfully, but these errors were encountered:
chrisdpeters
changed the title
Decide on changes for callbacks in response to #47
Decide on changes for callbacks in response to new #save_draft method
Nov 11, 2016
Hey @chrisdpeters, thanks for reaching out! I think the changes in #47 make a lot of sense, so changing the callbacks accordingly sounds good.
I used draftsman heavily on a previous project, but I've since moved to a new company and I don't recall which of the callbacks we were using. Regardless, this seems like a good API change for draftsman, and creating less ambiguous callbacks would be a good improvement.
I posed a question to @npafundi here in #47. I've since merged into master so I can work on some other features without an awful merge conflict.
Let's go ahead and have the discussion and track progress with callbacks in this issue.
Here is the question:
The text was updated successfully, but these errors were encountered: