Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

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 learn6 sections · 24 lessons
Start learning

Course curriculum

Meet 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. The Web, and Why Frameworks Exist12 min
  2. MVC — Model, View, Controller12 min
  3. Creating an App and Its Folders15 min
  4. The Rails Command Line and Generators12 min
  5. Rails and the Frontend: Hotwire15 min
Routing 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. RESTful Routes with resources15 min
  2. Named Routes and Inspecting Routes12 min
  3. Nested Routes and Extra Actions15 min
  4. Redirects, Constraints and Custom Routes15 min
Controllers4 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. Creating Controllers and Actions15 min
  2. Strong Parameters15 min
  3. Controller Callbacks (Filters)12 min
  4. Cookies, Sessions and Flash15 min
Models4 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. Creating Models, Migrations and Data Types15 min
  2. Model Relationships (Associations)15 min
  3. Validations12 min
  4. Model Callbacks and Model Methods15 min
Active 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. Basic Queries and Conditions15 min
  2. Ordering, Limits and Scopes12 min
  3. Joins, Aggregations, Raw SQL and N+118 min
Action 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. ERB Templates and Rendering Views12 min
  2. Layouts and yield12 min
  3. Partials and Helpers15 min
  4. Forms with form_with18 min