David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said over 4 years ago on Real Time Updates with ActionCable :
  it's using Rails 6. however, you should be able to do the same in Rails 5 with little to no changes. Some of the folder structuring may be different if you've not moved the javascript assets out of sprokets. However, the concepts are the same.

David Kimura PRO said over 4 years ago on Some Advanced Charts and Statistics :
  There is this episode which covers chartkick. https://www.driftingruby.com/episodes/charts-and-graphs To use it with Rails 6 or Webpacker

yarn add chartkick chart.js

And in app/javascript/packs/application.js, add:

require("chartkick")
require("chart.js")



David Kimura PRO said over 4 years ago on Multitenancy :
  It would depend if they should be two users or a single user within the system and how switching tenants would work. That's more of an architectural decision that has to be made. If they should be two separate users with the same email, you would need to include some sort of indicator for which tenant they are signing in to (i.e. subdomain). 

If they will be a single user, then you will need a table with the user_ids and the tenant_ids. I'd also have something that would trigger their session being tied to a single tenant. So, they would have a current_tenant which has one tenant selected from their has_many :user_tenants (or something similar).

David Kimura PRO said over 4 years ago on ViewComponent in Rails :
  It's still picking up traction and getting adopted more and more. I'd still consider it, especially since it's being backed by a larger company; github.

David Kimura PRO said over 4 years ago on Adaptive Bitrate Streaming with Active Storage :
  this will add a layer of complexity as the video is divided into small segments, but the end user browser still gets an unencrypted stream. You cannot really prevent downloading since the end user will need to play the video. However, if you were to have the video segments encrypted on the server side and provide a key to the end user to have their browser decrypt the video, this would add a level of complexity that most would just assume that they cannot access the videos.