Hi, I am trying to use the trix editor for adding ...
# avo-2
d
Hi, I am trying to use the trix editor for adding comments to a resource, but am getting this error when trying to add images to a comment "You can't upload files into the Trix editor until you save the resource.",
l
It's mandatory to have a saved record on which to attach the files
this is hwo trix works. when you append a file it's being sent to the server to the apropiate record to be saved
d
mmm whenever i have never encounted this before in the past with trix. How would I create a comment record then if I want an attachment? need to create comment, then edit it again to attach file?
l
1. you could do that 2. create a
no_confirmation
action that creates the comment beforehand and then redirects to the edit page, but you'll have to bypass any validation rules you might have. attach that action to the parent resource and remove the
create comment
button from the association page using the pundit policy
10 Views