I'm not sure whether this bug lies within Draftsman or my app, and I'm having trouble getting useful information to investigate further.
I'm posting here to check whether anyone else can replicate this.
A very simple test case:
# model
class User
has_drafts
has_one_attached :avatar
end
# console
> u = User.last
> u.name = "New Name"
> u.save_draft
=> false
# 'u' has no errors
> u.errors.messages
=> {}
# if 'has_one_attached :avatar' is commented out a draft is created as expected
> u.save_draft
=> true
- Why would activestorage prevent Draftsman from saving drafts?
- What is the best way to inspect the
save_draft method and find out what is causing it to fail?
I have also posted a question on SO https://stackoverflow.com/questions/54106001/why-does-draftsman-save-draft-return-false-when-the-model-has-activestorage-atta