carrierwave-neo4j
carrierwave-neo4j copied to clipboard
Update for activegraph
~~WIP:~~ I've started updating the gem to use the activegraph gem. This worked out fine so far. All tests are green.
However I had and still have some problems with integration into a rails app, I hope I may get some help here:
- Uploading via a create route did not work (update/edit worked fine), which was caused by the uploader getting set to nil everytime the entity with the mount was initialized. I've removed the after_initialize callback and now this works.
- I still have this problem: When creating an entity via a form and that forms file_field has no file selected for upload a SanitizedFile object is still created and the path without the filename (as it doesn't exist) is saved as the url of the upload. The model has a path to directory saved than as the upload. This causes problems, e.g. when editing and uploading a new file an error occurs because carrierwave tries to delete the directory.
Some other questions:
- Should the gem be renamed to carrierwave-activegraph (devise-activegraph was renamed). I haven't done this yet as I think the maintainers should decide on that.
- The version depending code in uploader_converter.rb may not be needed anymore? I have just changed it so that it works.
Would be great to get this forward! This would close #19