Rails 5b6e6402d20e1300d63b64d9a1feb6b11b07cce25b91d9303ffe5650c52b3bc5

Learn Ruby on Rails

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.

Trails

Ruby on Rails

Advanced ActiveRecord Querying

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!

Next Up

Introduction

In this course, we're going to go on a deep dive into ActiveRecord and teach you everything you need to know to manage complex relationships and queries. Joe Ferris, thoughtbot CTO and querying master, will be guiding us on our journey to help us take full advantage of ActiveRecord.

Unstarted

Querying belongs_to Associations

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.

Unstarted

Querying belongs_to Associations Exercise

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.

Unstarted

Querying has_many Associations

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.

Unstarted

Querying has_many Associations Exercise

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.

Unstarted

Querying with Custom Joins

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.

Unstarted

Querying with Custom Joins Exercise

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.

Unstarted

Querying with Aggregations

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.

Unstarted

Querying with Aggregations Exercise

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.

9 steps remaining
Ruby on Rails

Intermediate Ruby on Rails

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.

Next Up

Part 1

Unstarted

Part 2

Unstarted

Part 3

Unstarted

Part 4

4 steps remaining
Visit trail
Ruby on Rails

Test-Driven Rails

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.

Next Up

Introduction

The Ruby and Rails communities have begun to embrace test-driven design, and for many employers, it's a skill expected of developers. At thoughtbot, we consider it a core competency and drive all development through tests. For developers new to testing, however, the most common question asked is, "Why test?" Josh discusses the goals of testing, forms of testing, and the tools we commonly use when testing Rails applications.

Unstarted

Setting Up the App and Initial Test

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.

Unstarted

Creating the First Todo

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.

Unstarted

Signing In and Todo Ownership

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."

Unstarted

Refactor to User Model

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.

Unstarted

Completing a Todo

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.

Unstarted

Refactoring Todo Completions

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).

Unstarted

Marking Todos Incomplete

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.

8 steps remaining

The Weekly Iteration

Hosted by

Ben Orenstein

Ben Orenstein

Ben offers a few concrete tips on landing a new (or better) Rails job.

Hosted by

Ben Orenstein and Joe Ferris

Ben Orenstein
Joe Ferris

In this episode, Ben and Joe discuss Sandi Metz's rules. You can read the summarized rules. Pull 1 Pull 2 Pull 3 Reek

Hosted by

Chris Toomey and Melanie Gilman

Chris Toomey
Melanie Gilman

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.

Hosted by

Chris Toomey and Melanie Gilman

Chris Toomey
Melanie Gilman

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.

Hosted by

Chris Toomey and Derek Prior

Chris Toomey
Derek Prior

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!

Hosted by

Gabe Berke-Williams

Gabe Berke-Williams

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.

Hosted by

Derek Prior and Chris Toomey

Derek Prior
Chris Toomey

On this episode of the Weekly Iteration, Chris is again joined by Derek Prior, this time discussing building and extracting gems.

Hosted by

Joe Ferris

Joe Ferris

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...

Hosted by

Chris Toomey and Joshua Clayton

Chris Toomey
Joshua Clayton

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.

Hosted by

Joe Ferris

Joe Ferris

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.

Hosted by

Joe Ferris and Gabe Berke-Williams

Joe Ferris
Gabe Berke-Williams

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...

Hosted by

Chris Toomey and Joel Quenneville

Chris Toomey
Joel Quenneville

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...

Hosted by

Joe Ferris and Chris Toomey

Joe Ferris
Chris Toomey

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.

Hosted by

Chris Toomey

Chris Toomey

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...

Hosted by

Chris Toomey and Ben Orenstein

Chris Toomey
Ben Orenstein

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!

Hosted by

Chris Toomey and Derek Prior

Chris Toomey
Derek Prior

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.

Hosted by

Chris Toomey

Chris Toomey

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.

Free
Hosted by

Joshua Clayton

Joshua Clayton

This week, Chris is joined by thoughtbot's Development Director in Boston, Josh Clayton, to talk about factory_girl; a topic near and dear to Josh's heart, as he's been the maintainer of the project for over five years. Factory Girl is one of...

Hosted by

Joshua Clayton and Chris Toomey

Joshua Clayton
Chris Toomey

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...

Free
Hosted by

Chris Toomey and Derek Prior

Chris Toomey
Derek Prior

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,...

Hosted by

Chris Toomey and Ian Anderson

Chris Toomey
Ian Anderson

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.

Hosted by

Joshua Clayton and Chris Toomey

Joshua Clayton
Chris Toomey

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.

Hosted by

Derek Prior and Chris Toomey

Derek Prior
Chris Toomey

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.

Hosted by

Derek Prior and Chris Toomey

Derek Prior
Chris Toomey

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...

Hosted by

Tute Costa and Chris Toomey

Tute Costa
Chris Toomey

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.

×

15 Full Courses, 100+ Screencasts & New Content Weekly