Chris Oliver

Joined

234,920 Experience
17 Lessons Completed
256 Questions Solved

Activity

Posted in Group Chat with ActionCable: Part 4 Discussion

And you can definitely configure it to only create the websocket connection on the page you want like what you're describing. Just gotta write your JS to detect the page and connect when it's the correct one.

Posted in Group Chat with ActionCable: Part 4 Discussion

Websockets are just designed to be a persistent connection. As you're browsing the site the connection can stay idle until you need it. GitHub, for example, will leave the websocket connection open as you browse but only subscribe to receive events when you view or leave a Pull Request or Issue.

Posted in Group Chat with ActionCable: Part 4 Discussion

ActionCable should be on every page and always connected. You don't want to disconnect and reconnect constantly.

You simply want to ignore updates if they aren't relevant to the page you're looking at.

Posted in Get Email from DataBase for creating newsletter

Check out the Actionmailer guides: https://guides.rubyonrails.org/action_mailer_basics.html

If you had a LeadMailer that sent a new_lead email, it would be:

LeadMailer.with(lead: @lead).new_lead.deliver_later

Posted in Stripe payments course getting out of date

👍 The course will definitely help explain how all the payments stuff works better. Especially now that it's crazy complicated with SCA.

I should make a quick tutorial on one-time payments with Jumpstart Pro, because that's what I'm doing for selling the Jumpstart Pro licenses after all. I'll try and squeeze a screencast in today if I can.

Posted in Stripe payments course getting out of date

@bradley Yeah, I redid the whole thing but turned it into a separate course: https://courses.gorails.com/payments-with-rails-master-class

Covers one-time payments with a shopping cart example and subscription billing, all of it SCA compatible.

Posted in Tabs with Stimulus

(And hilarious accidentally just commented from my laptop, logged into a testing account).

Posted in Tabs with Stimulus

Haha! I don't want to admit, but I do that pretty regularly too switching between my laptop and desktop. 😅

Posted in Tabs with Stimulus

Hey Brian!

Looks like you've got some invalid HTML there. There's a closing tablerow tr tag, but no opening one and you're missing a closing div for the tabs.panel div?

Posted in Introduction to Stimulus Reflex Discussion

Stimulus Reflex is compatible with AnyCable. 👍

Posted in Tailwind - own components - yes or no?

Adam talks about this in one of the Tailwind videos. I'll let him explain it cuz he can do a better job than me. https://twitter.com/adamwathan/status/1245883595396386816

Posted in Introduction to Stimulus Reflex Discussion

It looks like they're going to be releasing some improvements to Turbolinks and things soon (when they launch Hey.com) that are similar to this. Can't wait to see what they release.

Posted in How do I store audio files in production?

I would definitely recommend uploading with Shrine directly to S3 and then serving the files up through Cloudfront CDN. That way the downloads will be quick as possible which is what you want when streaming.

If you can, you could certainly just have hosting somewhere else like Anchor if they have a way to embed the episodes. It's nice if you can have someone else manage the RSS feed, file storage and serving. We host RemoteRuby on Transistor and I will probably just embed their player if I build a custom site for it at some point.

Posted in Introduction to Stimulus Reflex Discussion

It can with just a little extra code. We'll be covering that soon, but here's how you'd do it: https://expo.stimulusreflex.com/demos/chat

Posted in Sending Emails with SMTP and Sendgrid Discussion

Yep! Devise just uses whatever email host you have configured with Actionmailer.

Posted in Multiple Users with Devise

Yeah, I'd probably do an additional model. User has_one :student_profile and you can create that after they register or something.

You can always include the host: option in your url helpers, but I always forget which default_url_options it looks for when that error comes up.

I would think it would be the routes default_url_options.

Posted in Deploy with problems

Hey Cristian,

On Dreamhost, you'll need to figure out how to run with RAILS_ENV=production so it will use the production entry in config/database.yml and so on.

If it's a VPS server you're using on Dreamhost, try this guide to get you setup: https://gorails.com/deploy/ubuntu/18.04

Posted in [SOLVED] Decrypt S/MIME 'file.xml.p7m' with OpenSSL

Awesome, thanks for posting your solution. I'm sure at some point when I need to use OpenSSL directly, this will come in handy!

Posted in Problem installing Capistrano

Strange, maybe try bundle exec cap install STAGES=production?

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.