button to delete all not working
Closed this issue · 5 comments
I removed the data-confirmation from the destroy button on _template_uploaded.html.erb, as methioned in notes, but, the general destroy button is not working.
Really? If you open up a javascript console with Chrome or a similar browser does it show you a javascript error in the console when you click the button? I'll have to look closer later tonight when I get a chance.
Hi Batter, I just checked it, no error msg shows up in the javascript chrome console.
@lymecca - What version of the gem are you using? And are you seeing any errors in your JS console? It should work fine, but the key is that there is ajax browser request that gets made to the S3UploadsController#destroy
action. That is what destroys the corresponding model instance, and then I put a callback on the SourceFile
model that also deletes the object on S3 prior to deleting the object in the database. You may need to update the callback if you've swapped in Fog. You should also ensure that the controller action is not raising an error for some reason by viewing the server log.
I just tested this on my local instance with the most recent release, 0.3.0
and it seemed to work fine regardless of whether the JS-confirm dialog was present or not.