rubyguides

Tutorial series

Rails Basics

8 tutorials — follow in order for the best learning path.

  1. Ruby on Rails getting started: install, create, and run your first app

    Rails getting started: install Rails, create your first app, understand the directory structure, and run the development server to see it all in action.

  2. Rails MVC Pattern: How Models, Views, and Controllers Fit Together

    Explore the Rails MVC pattern: understand the request lifecycle, what models, views, and controllers do, and see code examples that connect each layer together.

  3. Working with ActiveRecord Basics: Models, Queries, and Relationships

    Learn working with ActiveRecord basics in Rails through hands-on examples. Covers models, CRUD operations, validations, associations, scopes, callbacks,.

  4. Rails Migrations: Versioning Database Changes in Ruby

    A practical guide to Rails migrations: version your database schema with Ruby, create tables, add columns, manage foreign keys, and roll back changes safely.

  5. Rails Views and Partials: ERB, Layouts, and Fragments

    Learn Rails views and partials: how ERB templates render HTML, layouts wrap pages, and partials keep view code reusable with practical examples for beginners.

  6. Rails associations: belongs_to, has_many, and through relationships

    Learn Rails associations: belongs_to, has_one, has_many, through, and polymorphic. Connect models and manage dependent records with practical code examples.

  7. Rails forms and validations: building safe user input flows

    Learn how to build Rails forms, protect them with strong parameters, and use validations to keep user input clean and predictable.

  8. Rails Routing: RESTful, Custom, and Named Routes

    Learn how Rails routing maps HTTP requests to controllers and actions. Covers RESTful routes, custom routes, route constraints, and named routes in Rails.