copasetickid / draftsman

Ruby gem that lets you create draft versions of your database records.
MIT License
168 stars 62 forks source link

Reasons for failure #59

Open NullVoxPopuli opened 7 years ago

NullVoxPopuli commented 7 years ago

It would be nice if save_draft could add to errors or have an optional mode where it could raise an exception in development mode so I knew why something wasn't working :-(

chrisdpeters commented 7 years ago

@NullVoxPopuli I could see how this could be a problem with callbacks that fail. Are you able to give any specific example where this has been a problem for you?

andymcintosh commented 7 years ago

Possibly related: Calling save_draft on a resource that already has a draft fails silently unless you run install with the --with-changes flag. It took quite a bit of trial and error to discover because this was the only output in the console, and the errors object on the resource was empty:

(0.3ms)  BEGIN
(0.5ms)  ROLLBACK
=> false
jmfederico commented 6 years ago

If you are able to provide a known failure scenario where an error is not being raised so I have a starting point, it would allow me to starting working on this.