Save 36% for Black Friday! Save 36% on GoRails for Black Friday! Learn more →
How to build a complete, real-world application from scratch with Ruby on Rails step by step.
A lot of Ruby code is "magic". We'll explain the magic and see how it works using the powerful tools Ruby gives us.
Accept subscription and one-time payments with Stripe in your Rails apps
Expert advice on keeping Rails apps organized and fast.
Learn how to build fast, modern web apps with HTML over the wire.
Setup your computer with Ruby on Rails and deploy to a production server.
Cheap, easy hosting for Ruby and Rails apps.
Launch your product business way faster with our SaaS template.
A weekly podcast on web development and building products with Ruby, Rails, Javascript, and more.
A few of the Open Source projects we do at GoRails.
Build a Ruby on Rails app in 48 hours with us.
Help Junior developers get hired by sharing small projects to build their resume with paid work.
Find your next Ruby on Rails Job.
Now that we've got a thorough test suite, we want to make sure tests are run anytime we push code to GitHub. We can setup GitHub Actions to test our code and automatically deploy it when tests pass.
Testing our URL shortener is very important now that we've implemented edit permissions on Links. We want to make sure everything works as expected for each type of user.
Here's how we'd add Users and handle edit permissions for links. See how it compares to your implementation and consider the pros/cons of each approach.
In this lesson, we will look at a new option coming to ActiveJob in Rails 7.1 for enqueuing multiple jobs at once using the perform_all_later class method.
Anyone can add, edit, and delete any Link in our URL Shortener database. Your challenge is to add users, associate links with them and only allow editing of your own links.
We're ready to deploy our URL Shortener to production and we're going to do that using Hatchbox.io
How to upgrade to Rails 7.1 This will also work with any other version and offers a few tips on how to test things out and revert back if necessary.
Copy to clipboard is a required feature for a URL shortener. We'll implement this with two JavaScript libraries (clipboardjs and tippy.js) and a Stimulus controller.
We can retrieve the title, description, and OpenGraph metadata for URLs. Since HTTP requests can be slow, we'll implement this metadata lookup in a background job and broadcast to the frontend with Turbo.
In this lesson, we will look at a new option coming to the rails routes command in Rails 7.1 which will display a list of any routes deemed as unused in your Rails application. Let's see what qualifies a route as unused and learn some other handy tips!
It's time we start cleaning up the design and UI for a better experience with our URL shortener.
Analytics for links is a useful feature so lets record Views for links and show them in a graph
Next, we can build redirecting Short URLs to the URL on the Link
Now that we have Base62 encoding and decoding, we can tell Rails to use this for generating URL params and find
Rails 7.1's new generates_token_for method allows us to build password reset and Magic Link login tokens without storing details in the database. Tokens have expirations and can be one-time use so they can't be reused.
Decoding our Base62 encoded short codes is the next challenge
Has secure password is boasting some new benefits in Rails 7.1 with the addition of the authenticate_by method which reduces timing-based enumeration attack vulnerabilities. Also being introduced is the ability to provide a required password challenge.
Using Base62, we can take an Integer ID and compress it for short codes in our URLs
First things first, we need a Link model to store our
Normalizing data has always been a pain in Rails, but not anymore! Instead of callbacks or overriding setters, Rails 7.1 introduces "normalizes" to make normalizing data easy.