Chris Oliver

Joined

291,130 Experience
86 Lessons Completed
296 Questions Solved

Activity

Posted in How To Use Importmaps With Rails Discussion

I know the Rails Foundation is working on updating all of the guides so I'm sure it's on their todo list!

Doesn't the browser usually store the preference for granted notification access?

You might be able to change it so it only calls requestPermission() if Notification.permission === "default"

See: https://developer.mozilla.org/en-US/docs/Web/API/Notification

Posted in How To Use Importmaps With Rails Discussion

Thanks Matias!

Yes, it will be prorated. 👍

Thanks for your support!

Posted in How To Use Importmaps With Rails Discussion

Are you using import maps yet?

Posted in Creating a Ruby Gem for Black Friday sales Discussion

We're using this gem to hide and show the Black Friday sale banners on GoRails. 🎉

Check out our Black Friday sale: https://gorails.com/blog/black-friday-2024

To do that, you'd need to have a way to dynamically add the engine folders to the tailwind.config.js in the parent app. That runs Node, but you could probably have it run a Rails command to get a list of folders that you parse an add to the content: [] dynamically.

The main reason for keeping separate, precompiled CSS for engines is that they don't require the parent app to run Tailwind or any other framework that way.

Adding these exports will use Homebrew's Ruby and you don't want to use Homebrew's Ruby. You want to use Mise as we show in the guide.

After you follow the instructions in the guide, you may need to restart your terminal for it to detect the Rails command.

Posted in Authenticating Blog Admin Pages Discussion

What is the error?

Posted in How to use Dev Containers with Rails Discussion

You probably have to build it yourself, but the Rails devcontainer repo will let you specify the Ruby version with an env var: https://github.com/rails/devcontainer/blob/main/images/ruby/.devcontainer/devcontainer.json#L19

See also the Devcontainer docs: https://code.visualstudio.com/docs/devcontainers/containers

Posted in Stripe Connect setup with Pay gem

Marketplaces can be pretty confusing. I think this sounds right, but I can't remember if the users receiving payments will need to be a Merchant or not.

https://docs.stripe.com/connect/design-an-integration

Stripe now uses Payouts instead of Transfers, so we might need to update Pay a bit to help with that functionality. They're constantly changing things so it can be hard to keep up!

Everyone wants multitenancy to work differently, so what are you specifically trying to do? Separate logins by subdomain or something?

Those are on my list!

I really love how flexible and easy to customize the new Rails 8 authentication generator is. Think we should cover 2 Factor Auth next?

What do you think about having a built-in linter that comes with Rails?

Raise your hand if you're guilty of making this mistake in the past. 👋😬

Posted in How to use the Browser Guard in Rails Discussion

That's probably a bug in the UserAgent bot check I would imagine.

https://github.com/rails/rails/blob/v7.2.0/actionpack/lib/action_controller/metal/allow_browser.rb#L88

Posted in How to use the Browser Guard in Rails Discussion

If you're building a no build Rails application that makes use of modern browser features (like ONCE Campfire!), you'll definitely want to use this.

Posted in How to use Dev Containers with Rails Discussion

Amazing, thanks for sharing!

Posted in How to use Dev Containers with Rails Discussion

That would be great to know. Had the same question about OrbStack. 🧐