David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said over 4 years ago on Google Maps API with StimulusJS :
 You might be able to take from this episode and piece things together. It uses ActionCable and Stimulus together along with RailsUJS and ActiveJob.  https://www.driftingruby.com/episodes/realtime-client-updates-from-background-jobs-with-stimulus


David Kimura PRO said over 4 years ago on Service Objects for API Interactions with Twilio :
class << self
  def call(*arg)
    ...
  end
end

is the same thing as

def self.call(*arg)
  ...
end

It's a different way of calling a class method. Does that help?

David Kimura PRO said over 4 years ago on Two Factor Authentication :
  Looks like they changed their API a bit.

user.otp_code # => '850738'

qr = RQRCode::QRCode.new('http://github.com')
result = ''

qr.qrcode.modules.each do |row|
  row.each do |col|
    result << (col ? 'X' : 'O')
  end

  result << "\n"
end

David Kimura PRO said over 4 years ago on Drag and Drop with draggable :
  yes, you could jQueryUI and StimulusJS isn't an absolute necessity, but it does make things a bit easier with the selectors and keeping the code more organized. 

David Kimura PRO said over 4 years ago on Streaming Videos with Active Storage :
  instead of this.playerTarget you could use a DOM selector like document.getElementById