David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said over 3 years ago on Ransack Search and Hotwire :
  I was giving Github's Copilot a test run.




David Kimura PRO said over 3 years ago on FullCalendar with StimulusJS :
   What version of Full Calendar are you using? They seem to change their API with quite a few breaking changes between versions.

David Kimura PRO said over 3 years ago on Hotwire Turbo Replacing Rails UJS :
  Turbo is essentially the replacement for Turbolinks so changes will be coming in the future. We don't know what that quite looks like yet, but there will be changes coming. As time goes on, I don't know what will become of Rails UJS either. There's a lot of unknowns right now, but this episode was looking to help demystify some of the issues with creating a new Rails application without Webpacker and seeing how things work with Hotwire.

David Kimura PRO said over 3 years ago on Streaming Videos with Active Storage :
  that is happening because you're using StimulusJS 2.x and the video was recorded when 1.x was the stable version.

<%= content_tag :video, data: { target: 'video.player' } do %>

could be changed to 

<%= content_tag :video, 'data-video-target': 'player' } do %>

or

<%= content_tag :video, data: { video: { target: 'player' }} do %>

David Kimura PRO said over 3 years ago on FullCalendar with StimulusJS :
  If you did add a cancel button, it could be an action when you click on it, it will execute a function. Then in the stimulus controller, you could dismiss the modal.

static targets = ["calendar", "modal", "dismiss", "start_time", "end_time"]

closeModal() {
  this.modalTarget.style.display = "none"
}

And in the view

<div class="modal-footer">
  <%= button_tag "Cancel", "data-action": "calendar#closeModal" %>
  <%= form.submit class: 'btn btn-primary' %>
</div>

I haven't tested this out, but it should be relatively accurate.