David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said almost 5 years ago on Adding Custom Buttons to Action Text :

  , I would hide the button with something like


trix-toolbar .trix-button--icon-heading-1 { display: none; }

David Kimura PRO said over 4 years ago on Importmaps in Rails 7 :
  I would probably use their provided gem for bootstrap. But for other things where a gem isn't provided, I am not quite sure of the best method yet. I think that this will be one of the growing pains as we'd have to find out the best routes for these things. I can see other libraries like FullCalendar where this too would be a concern.

# Gemfile
gem 'bootstrap', '~> 5.1.0'

# app/assets/stylesheets/application.scss
@import "bootstrap";

# app/javascript/application.js
//= require "bootstrap"


David Kimura PRO said over 4 years ago on Slim Select with Stimulus :
  I found it a bit strange on single selects not behaving the same as multiple selects. 

David Kimura PRO said over 4 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 over 4 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.