David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said about 2 years ago on Tags from Scratch :
Inspect your page and make sure that the options value is being set for the Stimulus Controller

David Kimura PRO said about 2 years ago :
You may need a rake task to run on the blobs. In the Rails console, look up a Blob that was uploaded.
ActiveStorage::Blob.first.service_name
It will likely return something like
local

Whatever you have set for the name in the storage.yml will be what you need to set for the service_name. You can bulk update this with something like
ActiveStorage::Blob.update_all(service_name: 'contabo')
Where, in this example, contabo would be the top level key name of the service in the storage.yml.

David Kimura PRO said about 2 years ago on Tips and Tricks :
I think that in your example with p2, if you do 

p2 = Project.where(id: 13).load

Then you will find that 

p2.any?

will not trigger an additional query. I think that the way Rails is behaving, it's because the query isn't loading in IRB. If you type p2 in the terminal again, I think it will trigger another query.

David Kimura PRO said about 2 years ago on Custom Fonts :
I think any of them would be sufficient and you can set the CSS to apply the font to the <body>. You'd have a CSS class for each font and that would be set based on their settings or the default font.

David Kimura PRO said about 2 years ago on Deferred Content Loading :
Are you using webpacker with this app or esbuild (or similar)? For now, you could try to take the stimulus controller from the code repo and add it into your app. Alternatively, and perhaps my current preferred approach is to use Turbo and a turbo_frame_tag with the src attribute. No javascript needed with this approach.