stavro / arc_ecto

An integration with Arc and Ecto.
255 stars 149 forks source link

Add delete_attachments to schema #77

Open tulinmola opened 7 years ago

tulinmola commented 7 years ago

Added delete_attachments to easily delete file contents when deleting schema data using changesets. Readme file has been updated with an example.

Some changes have been made to tests because of some problems with mocks. I was trying not to change them too much. But here are (commented in commit): DummyDefinition being in the same file than schema test caused mock library to fail in some cases (as it documentation says, because of the way mock overrides the module, it must be defined in a separate file from the test file). That's why definition module was declared in setup for each test, causing some warnings that are gone now.

Just tell me if you need something more. Thanks for the library!

danschultzer commented 7 years ago

I could use this. @stavro wdyt?