David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said about 3 years ago on Slim Select with Stimulus :
  That was my findings as well. It is rather annoying. I wasn't able to find a suitable solution except to just display what is selected.



If you don't change the value of the select then it will not change the persisted value. But since we are not pre-populating the list, it will allow you to select from the ajax list. I agree, it is rather annoying. I would see this as a defect in slim-select as the same behavior doesn't happen with their multiple select.

David Kimura PRO said about 3 years ago on Direct Upload Instantly :
  It should work without any modifications to this episode. I've pulled the code from this episode and updated a few things (using ruby 2.7.4, updated webpacker, updated mimemagic). These changes were really more related to my environment rather than changes required for the feature to work. No changes to the actual code and it allowed updating of existing images. Is your use case doing a has_one_attached or has_many_attached? If you have a has_many_attached situation, it becomes a bit more difficult. But, the has_one_attached works and it does clean up the previously uploaded image too.

David Kimura PRO said about 3 years ago on Hotwire Turbo Replacing Rails UJS :
Thanks for sharing   

David Kimura PRO said about 3 years ago on Slim Select with Stimulus :
  Do you have <%= stylesheet_pack_tag 'application' %> in the layouts?

David Kimura PRO said about 3 years ago on Cropping Active Storage Uploads :
  Since we are using CSS within webpack, (import "cropperjs/dist/cropper.css"), you would also need to add the stylesheet_pack_tag in the application layout. Typically, it would probably be something like this 
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>