2,510 Experience
24 Lessons Completed
0 Questions Solved


Posted in How to use Stripe Checkout in Rails Discussion

ok, I was looking for section 8 in the stripe docs, was LOST in the first 7 md files.

Posted in How to use Stripe Checkout in Rails Discussion

Also if the docs were less cryptic it would be helpful, maybe an example app.

Posted in How to use Stripe Checkout in Rails Discussion

I'm not understanding how the pay docs and this video are so different. ¯_(ツ)_/¯ Has it changed that much?

Posted in Dynamic Single Table Inheritance with Rails Discussion

Imma have to watch this a couple more times.

Nice! I used STI for an app with all types of documents, and I used the jsonb_accessor gem. It allows you to query the json fields just as if it were an active record column.

so my documents had just four columns but within the json column the table really looked more like this...

And I could just say InsuranceDocument.account_id even though it was technically InsuranceDocument.customData["account_id"]

I'm interested in delegated types as well.

Posted in Direct Uploads with ActiveStorage Discussion

Hey, do you know if you can upload to a folder structure within an s3 bucket? I'm planning on having users (who have UUID's) to have direct uploads behind the scenes to UUID/filename (virtual folder... would hopefully be created if it wasn't there), I've read ActiveStorage didn't support it but it was an older article. If not, I wonder how significant of a risk it would be to just have all files in a bucket.

Posted in Net Http API Client from Scratch Discussion

Cat is a superstar. There's something about interruptions that makes things more funny and authentic. So if this basically the first step before extracting this to a ruby gem to build an sdk/wrapper? I'm going to watch that course next.

Posted in Open Closed Principle Discussion

Same thoughts. However, there has to be a limit as to what a "responsibility" is. To make it more general you would say it's to set up Digital Ocean. Otherwise you can keep abstracting the responsibilities until you just have one line files. I think more in moderation especially for the framework.

Posted in Single Responsibility Principle Discussion

🤦🏻‍♂️ oh yeah. Thanks.

Posted in Single Responsibility Principle Discussion

if you placed those classes in app/scripts wouldn't you have to wrap them in a module Scripts?

Posted in How to use ESBuild in Rails with JSBundling Discussion

I just upgraded an enterprise Rails 6 sprockets 3 app to rails 7, that used webpacker 4 built css and renders react components occasionally. It's about 8 years old so it was the craziest upgrade. I tried shakapacker, vite-rails, esbuild, cssbundling, and pretty much anything in between. What ultimately ended up working was unwinding the scss from webpacker, and then going to sprockets 4 and dartsass-rails. once the site worked exactly the same, I went to jsbundling-rails with esbuild and slowly moved each entrypoint to their new app/javascript folder. I wanted to get the file structure back to a more rails default instead of ui > js > sccs. (although I left all the react-rails files in the ui folders). I didn't need to do any jquery import fixes. I just added //= require jquery3 in the assets/javascripts jquery.js file. Then load javascript_include_tag "jquery" in application.html

I'll probably write up a blog post about challenges of upgrading an app that had over 30 contributors over almost a decade.