Activity
Posted in How do I start from the very beginning?
Follow the GoRails Learning Path.
Thanks Ashish!
Posted in Tutorial on verifalia gem
Cloudflare as a proxy could help block the malicious user. They can block requests from known bots and present barriers to stop them.
They also run hCaptcha that you can implement in the sign up process to protect from bots. We have a lesson on that here: https://gorails.com/episodes/how-to-usehcaptcha-with-ruby-on-rails
I also like using invisible_captcha which is similar and doesn't require a third-party service (although it's not quite as good).
I don't see this feature used often in Rails apps, but it's super powerful for things like this. An easy way of creating Ruby objects like this allows you to really organize functionality instead of stuffing it all in models.
Posted in Scraping Web Pages with Ruby Discussion
Keep watching. Nokogiri is just an HTML parser, but you need to write code to interact with it, which is why we create the Scraper class.
You may not want / need that to be accessible by everyone, in which case you don't want to add it to the ActiveRecord class, just the association.
Maybe we'll start a new series on metaprogramming. 👍
Posted in Amazon S3 in blog tutorial error
Make sure you added the credentials to the right credentials file (using rails credentials:edit --environment development
) and that you've added it to all of the ones you need.
You can also open up the Rails console and use Rails.application.credentials
to confirm they're loaded properly.
You can either check the class with is_a?
or check methods if with respond_to?
Yes, it's fixed. https://github.com/basecamp/mission_control-jobs/pull/47
No different than html.erb views. Both just generate the HTML independently of the JavaScript.
I feel like components in Ruby are super duper handy for arguments and other complex helper methods. Phlex takes it a step further with the HTML helper methods so you don't even really have to leave Ruby while you're coding. Pretty cool stuff!
I'm not sure if anyone's using Litestack, but SQLite is ready to go. You'll just want to set the SQLite database location to the shared directory so it isn't lost between deploys. I think Rails has changed it's default location to /storage which is automatically symlinked on deploy (just make sure the folder is not in your repo), so it may be good to go as-is.
Posted in Template Locals in Rails 7.1 Discussion
That should work but let me know if it doesn't!
Yeah, Puma is the Rails default.
Super excited to see Mission Control out in the wild. It's a dashboard for ActiveJob that works across queue adapters. What's nice is that in the long term you can swap out backends but still have the same UI for monitoring and retrying jobs.
This was really fun. I wanted an easy way to introduce helpers to Notifications so by exposing them also as STI models, we could make them easily accessible with separate helper methods for each Notifier type. Super cool how flexible Ruby is for allowing these types of solutions!
Posted in What's New In Ruby 3.3 Discussion
ASDF users use an env var to use the latest ruby-build:
ASDF_RUBY_BUILD_VERSION=master asdf install ruby 3.3.0
Posted in What's New In Ruby 3.3 Discussion
Probably today.
Posted in What's New In Ruby 3.3 Discussion
Happy Holidays and New Year everyone! 🥳