Tim Dowling PRO
Joined 1/28/2019
Tim Dowling PRO said over 4 years ago on Autocomplete with StimulusJS :
Amazing!! thank you so much!!

Tim Dowling PRO said about 4 years ago on StimulusJS, Active Storage and DropzoneJS :
This is awesome, i'll be implementing this instead of the action text embeds so I have more control over the layout when displaying images and other documents. thank you!

Tim Dowling PRO said about 4 years ago on StimulusJS, Active Storage and DropzoneJS :
I do have a question, if i wanted to place this on an existing record  and remotely update on the record how would I go about handling the array of multiple files/images? I've tacked on the below to the "addedfile" method  but getting a 'unpermitted param evidences' error even though I have evidences: [] permitted in params. I think it's how i'm formatting the params in the formData.append - any clues? (I've got this working with one file)

let formData = new FormData()
            formData.append("event[evidences]", this.hiddenInput.value);
            Rails.ajax({
              url: this.data.get("update-url"),
              type: "PATCH",
              data: formData
              
            });

Tim Dowling PRO said about 4 years ago on StimulusJS, Active Storage and DropzoneJS :
Thanks for the quick reply, It's actually coming through as Parameters: {"event"=>{"evidences"=>"event[evidences][]"}, "id"=>"22"} which tells me I may not need append, but removing this throws a 'event not present' error for the params.

Yup, I do have 

has_many_attached :evidences