David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said over 5 years ago on SOLID - Single Responsibility Principle :
I agree. I think that we have to use some sense where applicable. However, the overall concept, I feel, is in the right direction for maintainable code. I would much prefer this over the other extreme where classes and methods are huge. I've seen some classes with over 1000 lines of code and also some methods with 600 lines of code. They're completely unmaintainable and writing tests for huge methods is near impossible.

David Kimura PRO said over 5 years ago on SweetAlerts in Rails 6 :
Yea, it's really strange. On Rails 6, changing it remove the jQuery dependency, it doesn't work. I updated your code to ``` Rails.showConfirmationDialog = function (link) { const message = link.data('confirm') return swal.fire( { title: message, type: 'warning', showCancelButton: true, reverseButtons: true } ).then(function (result) { if (result.value) { return Rails.confirmed(link) } }) } ``` and the javascript alert fires, but the SweetAlert doesn't. It has to be something with the `showConfirmationDialog` not getting set or fired properly.

David Kimura PRO said over 5 years ago on SweetAlerts in Rails 6 :
And, changing the original code with your confirmed element instead of removing the data attribute doesn't work either. It's really strange. `Rails.confirmed(element)`

David Kimura PRO said over 5 years ago on ViewComponent in Rails :
My guess is that there will be a lot of fine tuning done so it better fits into the Rails-way/style of things. I think that it has made some good improvements since its original design. I haven't given complete buy in to it yet, but will definitely be keeping a close eye on it over the next many months. Though, having a lot of my view being tested in the same fashion of the rest of my code does seem very appealing.

David Kimura PRO said over 5 years ago on Migration from Paperclip to ActiveStorage :
I would reference the upgrade guild for migrating from Paperclip to ActiveStorage. https://github.com/thoughtbot/paperclip/blob/master/MIGRATING.md