Skip to content
Pebellslearn by building

The course

Ruby On Rails

Learn how a Rails app turns a web request into a page. You will route URLs, write controllers, model data with Active Record, query it, and render it with views and forms — all on one small book club app.

Ready to learn

Your path through the ideas

Inside the course

7 modules · 24 lessons
CLI tools & setup · Start here

Install your tools, choose your setup and verify a local run.

02Meet Rails5 lessons

See what happens when a browser asks for a page, why a framework handles the repetitive parts, and how Rails splits the work into models, views and controllers. Then create the Bookclub app, tour its folders, drive it from the command line and meet Hotwire.

  1. 01The Web, and Why Frameworks Exist12 min
  2. 02MVC — Model, View, Controller12 min
  3. 03Creating an App and Its Folders15 min
  4. 04The Rails Command Line and Generators12 min
  5. 05Rails and the Frontend: Hotwire15 min
03Routing Fundamentals4 lessons

Declare the seven standard routes with one line, name and inspect them, nest reviews under books, add extra actions, and shape URLs with redirects, constraints and options.

  1. 01RESTful Routes with resources15 min
  2. 02Named Routes and Inspecting Routes12 min
  3. 03Nested Routes and Extra Actions15 min
  4. 04Redirects, Constraints and Custom Routes15 min
04Controllers4 lessons

Write controller actions that render or redirect, accept form data safely with strong parameters, share setup with callbacks, and remember members between requests with cookies and sessions.

  1. 01Creating Controllers and Actions15 min
  2. 02Strong Parameters15 min
  3. 03Controller Callbacks (Filters)12 min
  4. 04Cookies, Sessions and Flash15 min
05Models4 lessons

Create models and their tables with migrations and column types, connect books to reviews with associations, keep bad data out with validations, and run code at the right moment with callbacks and model methods.

  1. 01Creating Models, Migrations and Data Types15 min
  2. 02Model Relationships (Associations)15 min
  3. 03Validations12 min
  4. 04Model Callbacks and Model Methods15 min
06Active Record Queries3 lessons

Find records and filter them with conditions, sort and reuse queries with scopes, join tables and compute totals, drop to raw SQL safely, and fix the N+1 problem that slows so many Rails pages.

  1. 01Basic Queries and Conditions15 min
  2. 02Ordering, Limits and Scopes12 min
  3. 03Joins, Aggregations, Raw SQL and N+118 min
07Action View4 lessons

Write ERB templates that output data safely, wrap every page in a layout, split repeated markup into partials and helpers, and build forms with form_with that show validation errors.

  1. 01ERB Templates and Rendering Views12 min
  2. 02Layouts and yield12 min
  3. 03Partials and Helpers15 min
  4. 04Forms with form_with18 min
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.