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.
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 have password sharing, it's important to add roles & permissions so users have limited access to actions on shared passwords.
ActiveRecord Aggregations let you use composed_of to combine columns into a single attribute using a Ruby object.
Rails' ActiveRecord supports virtual generated columns in the database. For example, you can use these for converting numbers like degrees Celsius to Fahrenheit. These columns are saved with the regular table data and allows you to query against them.
Pagination is something we don't need until we publish a lot of blog posts. We can use the pagy gem to add page links to the bottom of our pages and handle thousands of blog posts.
Our first step in building any application is designing what database models we will need to store our data.
Since we're planning to share passwords with multiple users, we need to use a join table to associate the password with users. We'll explore how to set this up and create records using the join table and has_many through association
Errors can come up in many different ways. This episode, we'll look at how we can improve error handling in the noticed gem to cleanly handle issues with ActiveRecord without negatively affecting
Did you know serialize can be used for more than saving Ruby hashes as JSON or Yaml in your db? You can take any attribute and convert it to an object seamlessly with Rails using serialize and custom coders.
Rails associations provide an object that quacks like an ActiveRecord but is actually a CollectionProxy. We can extend the proxy object with our own functionality to add useful features with Ruby Modules.
Hotwire lets us broadcast changes so we can use the same approach for nested comments, but in realtime!
Rails uses the Ruby subscript operator to implement versioning with ActiveRecord Migrations. We'll learn how this works and implement it from scratch to see how it all ties together
Creating draft records in your database can be tricky. We'll be using the Draftsman gem to help us create draft versions of our records with our autosave Javascript
Modules and concerns provide a way to make functionality reusable across your Rails application and other apps. In this lesson, we'll show you how we can refactor our comments functionality to add a feature to any resources in Rails.
Complex queries can slow your page rendering down. We can now run long queries in parallel with Rails 7's load_async method in ActiveRecord to speed up page rendering.
Using Signed GlobalIDs, we can create polymorphic select boxes in Rails to easily choose a record of any type. This is also secured by using signed global IDs to prevent tampering by malicious users.
Nested comment threads pose a lot of unique challenges. One of these is deleting comments because you can easily lose the child comments or context. We'll take a look at a couple great ways of handling this.
Updating slugs
Adding pagination to our nested comment threads is easier than you might think, plus we'll take a look at a couple different approaches we can use
With Rails 6.0, you can now define multiple primary and replica databases, define separate migrations for each primary database, and configure each model to read and write from different databases.
Custom ActiveRecord validations are easy to make and they're implemented exactly the same way as the built-in Rails validations. It's super handy to be able to add nice, clean validations that you can repeat throughout your apps.
Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.
We care about the protection of your data. Read our Privacy Policy.