Ruby on Rails is an open source web development framework designed to get cleanly coded applications up and running with the minimum of time and the maximum of programmer happiness (and we’re not kidding, programmer happiness is one of Ruby’s official goals!). If you’re looking for a path into creating highly functional web apps with all the bells and whistles in the shortest possible time and with the least possible pain, learning Ruby on Rails is a very good choice.
Our Ruby on Rails tutorials start with a set of fundamentals, then move on to intermediate topics that will help you take basic Ruby skills to a more advanced level. The course aims to make learning Ruby on Rails swift, but the more advanced course materials will make sure that you understand everything a Rails pro needs. You can start a high-quality Ruby on Rails curriculum, starting right now.
Those who already have some experience with Ruby on Rails and want to expand and deepen their skill set can either start on the intermediate tutorials straight away or pick a specific topic, like the extremely popular Test-Driven Rails trail, and dive in.
The ActiveRecord query interface is an impressive feat of engineering, but often we only use a small portion of it. In this trail we'll dive deep into ActiveRecord and learn how to build complex queries taking advantage of eager loading, sub-selects, ordering across joins, and more!
The ActiveRecord query interface is an impressive feat of engineering, but often we only use a small portion of it. In this trail we'll dive deep into ActiveRecord and learn how to build complex queries taking advantage of eager loading, sub-selects, ordering across joins, and more!
Learn everything you need to work with your belongs_to relationships inside the database. Use joins, merge, and more to define concise, efficient queries that take full advantage of ActiveRecord's power.
Put your new querying knowledge to the test with this exercise on querying belongs_to associations. Combine joins, merge, and the rest of tactics learned in the Querying belongs_to Associations video to lock in your new knowledge.
Learn advanced techniques for querying your `has_many` associations, including a deep dive into the `joins` method and how to use `merge` to compose queries and keep them logically separated.
Practice makes perfect, so dive into this exercise on querying has_many associations to lock in what you learned in the previous video. Use joins, distinct selects, and subqueries to query your has_many associations with ease.
In some cases ActiveRecord just can't figure out the query you need, so you'll need to write it yourself. Luckily, it's not an all or nothing proposition. In this video learn how to use custom joins to answer complex questions about your database that ActiveRecord can't do for you.
ActiveRecord can do a lot, but not everything. With this exercise, practice giving ActiveRecord a hand by writing custom SQL statements to define a join, all within the context of a larger ActiveRecord query.
After watching this video you'll attain querying master status. With this last installment, Joe teaches how to do some counts, minimums, maximums, averages, and sums. We'll even see how to perform these aggregations after grouping rows according to certain criteria and how to filter based on the results of these calculations, all via the database.
With this final exercise we'll bring everything together and even perform calculations and aggregations in the database. Complete this and you'll truly be a querying master.
Dig deeper into Ruby on Rails. This series of video tutorials will help you move beyond the basics and start understanding and using more advanced Ruby- and creating better Ruby apps.
Dig deeper into Ruby on Rails. This series of video tutorials will help you move beyond the basics and start understanding and using more advanced Ruby- and creating better Ruby apps.
Learn Test-Driven Rails Development using RSpec and Capybara in this series of tutorials. As part of the course, you can follow along with Josh as he lets his test drive through each of the steps needed to build out an application.
Learn Test-Driven Rails Development using RSpec and Capybara in this series of tutorials. As part of the course, you can follow along with Josh as he lets his test drive through each of the steps needed to build out an application.
Time to write our first test! In this video, Josh discusses how to lay the foundation of a test suite within a Rails application, outlines the structure of an acceptance test, and writes an initial test ensuring we can interact with the application itself.
With an understanding of basic browser interactions, we're now equipped to dig deeper into the Todo application. We'll discuss new test assertions and how to interact with forms by creating a todo.
A list of todos is arguably valuable only when the list is owned by one person (or a group of people), but not everyone in the world. In this video, Josh introduces a simple User model and ensures that the todos created are assigned to the person who's "signed in."
We've gone over "Red, Green, Refactor", but haven't performed a larger refactor in the todo codebase. In this video, Josh refactors the controllers to isolate interaction of `session` and introduces a `User` class which mimics a basic authentication library.
Managing a list of tasks to accomplish is great, but you know what's even cooler? Being able to mark things as done. In this video, Josh drives tracking completion of todos through acceptance and unit tests, and covers the intricacies of RESTful actions within the todo application.
Tests are code too, and as such, they can be refactored during the "Refactor" step of "Red, Green, Refactor." In this video, Josh covers how to extract common interactions and assertions in the test suite (having introduced similar paths through todo creation, todo ownership, and todo completion).
What happens when you incorrectly mark a todo complete? You mark it incomplete, of course! In this video, Josh introduces functionality to mark completed todos as incomplete, and refactors the controller to leverage a similar interface to marking a todo as complete.
Rails makes many of our day to day tasks much easier, but sometimes this ease comes at a cost. Consistently across applications we see a lack of encapsulation and the shared global state of controllers and views to be one of the biggest sources of...
When all you have is the hammer of Rails, everything looks like a database backed dynamic site. But often we'd be much better served by a simple static site, and Middleman is a great choice for building these static sites. Join Chris as he shows...
Our languages give us great tools in the form of primitives: things like integers, strings, and arrays. However, over-relying on these leads to problems. This practice even has it's own fancy code smell name: Primitive Obsession. In this video,...
Ben and Joe continue to develop the Pastie application, demonstrating how to introduce authentication. We discuss how to retrofit existing components with unit tests, as well as the differences between authentication and authorization.
Join Chris and Derek Prior (Development Director in thoughtbot's Boston office) to talk about Clearance, a great solution for email and password authentication. Just like Rails, Clearance is opinionated, and those opinions help make it more secure...
Rails 5 is on the horizon and now's the perfect time to take a look at the features and changes coming with this major release. Derek Prior takes us on a tour of the changes, as well as showing us how to upgrade to the current Rails 5 beta.
Ben offers a few concrete tips on landing a new (or better) Rails job.
Take a peek behind the scenes at some of features and workflows we've built up to help support Upcase as a production application and manage it across the varied environments of development, staging, and production.
The Rails console is a Rails developer’s best friend. On this week’s episode we take a look at some little-known tips and tricks for increasing your efficiency in the console.
Slow and redundant database queries got you down? Well have no fear! On this week's episode, Chris and Joe dive deep into the strategies you can use to optimize your queries and get your app back to ludicrous speed ASAP.
On this week's episode, Chris is again joined by Melanie Gilman to discuss the amazing array of extensions added to Ruby by Rails' Active Support component.
Join Tute Costa, the maintainer of thoughtbot's Paperclip gem, as he talks about how to be the best maintainer you can be, including how to quickly respond to issues and how to version your code.
If your application uses third-party APIs, it can be complicated to write good, flexible tests that don't depend on the service being present (or don't touch production data). In this Weekly Iteration, Joël Quenneville and Chris Toomey examine...
Rack is the glue that binds application frameworks like Rails and Sinatra to web servers like thin and puma. In this episode Joël Quenneville takes us on a tour of Rack and shows us how we can take advantage of the Rack pattern to build more...
On this episode of the Weekly Iteration, Chris is again joined by Derek Prior, this time discussing building and extracting gems.
Gabe joins Ben to discuss Apprentice.io. They discuss how to be a great mentor, how to help apprentices feel comfortable, and how (and why) to run an apprenticeship program at your company.
On this week's episode, Chris is again joined by Josh Clayton, Boston Development Director and TDD master, this time to discuss the power of page objects for cleaning up feature specs.
Mutation-related bugs are some of the most common in the Ruby world. Joël and German explore many of the gotchas related to mutation, how to avoid them, and discuss when mutation might not be necessary at all.
Recently, we ran a group-coding app-building contest for Upcase subscribers. In this video, Ben and Chris review each of the submissions, both highlighting great aspects and suggesting some areas for improvement. Live code review at its finest!
We've been writing Ruby for years on lots of different projects and in many different environments. This has led to thoughtbot's Ruby style to be somewhat different to the rest of the community's. In particular, we tend to focus on a sub-set of...
Keyword arguments allow us to write code that is both more expressive, and more flexible. Tune in as Ian and Chris dive into some of the more subtle aspects and demonstrate how we can use keyword args to produce clear, reliable code.
On this week's episode, Chris is again joined by fellow bot Derek Prior, this time to discuss Turbolinks. Tune in to learn how to speed up your Rails apps, almost automatically!
On this week's episode, Chris is joined by Boston Development Director and TDD master Josh Clayton to discuss some of the tips we have here at thoughtbot for working with Heroku-deployed applications.
On this week's episode, Chris is joined by fellow thoughtbotter, Melanie Gilman, to discuss the wonder of Ruby's Enumerable and Comparable interfaces and how you can incorporate them into your own classes.
In this episode, Ben and Joe discuss Sandi Metz's rules. You can read the summarized rules. Pull 1 Pull 2 Pull 3 Reek
On this week's episode, Chris takes us through everything we need to work with PDFs in our Rails apps: the easiest way to generate them, how to properly serve them as responses in our controllers, and even how to test them.
Database views are a great way to separate the complexities of database persistence from your application logic. Unfortunately Rails doesn't have built-in support for them, making them difficult to work with. Scenic, a new gem from thoughtbot,...
Joe and Gabe review form objects, and explain why they can almost always replace accepts_nested_attributes_for. See an example Rails app written with nested attributes and how and why we recommend switching to form objects. Nested Attributes...
This week, Chris is joined by thoughtbot's Development Director in Boston, Josh Clayton, to talk about factory_bot; a topic near and dear to Josh's heart, as he's been the maintainer of the project for over five years. FactoryBot is one of...
On this week's episode, Chris is joined by Derek Prior to discuss Rspec's Bisect, a tool to track down order-dependence in your test suite and banish pesky intermittent test failures.
Joël Quenneville presents the why, what, and how of testing in isolation!
Ben joins Joe and build out the first feature in a Rails application, from scratch. Learn our process for jump-starting new applications using Suspenders. We'll also use our first integration test to help sketch out the first interactions in the...