Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

Ruby on Rails 5 Basics Course

via Treehouse

Overview

Prepare for a new career with $100 off Coursera Plus
Gear up for jobs in high-demand fields: data analytics, digital marketing, and more.

In this course, we're going to set up a simple blogging app with just a handful of Rails commands. Then, we'll dive into what we've created and help you really understand what's going on. We'll show you how to work with models, views, and controllers to quickly add new features to your app. By the end of this course, you'll be ready to create basic web apps in Rails.

What you'll learn

  • Creating Rails apps
  • Models
  • Views
  • Controllers

Syllabus

Creating an App

We'll create a new Rails app, and a simple resource. A resource is something you want users to be able to create, read, update, and delete instances of. With just a couple Rails commands, your site will be ready to run and fully interactive!

Chevron 7 steps
  • Introduction

    3:22

  • Creating a Rails App

    3:44

  • Running a Server

    3 questions

  • Creating a New App

    3 objectives

  • Our First Resource

    6:38

  • Rails Resources

    3 questions

  • Creating a Resource Scaffold

    2 objectives

Handling Requests

In this stage, we'll take a closer look at the resource we've created, and show you how Rails handles requests.

Chevron 9 steps
  • The Browser's Request

    1:50

  • Browser Requests

    2 questions

  • The Controller

    1:47

  • Handling Requests

    4 questions

  • Complete a Controller

    1 objective

  • The Model

    2:18

  • The Model

    5 questions

  • The View

    2:52

  • The View

    4 questions

Using the Rails Console

The Rails console is useful when you need to do an operation on many model objects at once, or to look at model attributes that you haven't yet added to your views. We'll show you how to update model objects using the console.

Chevron 10 steps
  • Launching Rails console

    1:04

  • Launch the Console

    1 objective

  • Rails Console: Reading Model Objects

    1:57

  • Read Operations

    3 objectives

  • Rails Console: Creating Model Objects

    2:10

  • Create Operations

    3 objectives

  • Rails Console: Updating Model Objects

    1:22

  • Update Operations

    3 objectives

  • Rails Console: Deleting Model Objects

    1:21

  • Destroy Operations

    2 objectives

Adding a Model Attribute

Our app is able to store titles for our posts, but we forgot to add a post body to hold the actual post content. In this stage, we're going to fix that. First, we need to add a column to the database, so that our post model objects can store the value of their body attributes. Then we'll need to update our views to let us show those values. And finally, we'll need to update the controller to allow new body text to be submitted from HTML forms.

Chevron 9 steps
  • Updating the Model

    3:47

  • Generating a Migration

    2 objectives

  • Updating Views

    4:58

  • Updating a View

    1 objective

  • Updating Partials

    3:31

  • Updating a Partial

    1 objective

  • Updating Strong Parameters

    3:50

  • Updating Strong Parameters

    1 objective

  • Wrap Up

    1:12

Taught by

Jay McGavren

Reviews

Start your review of Ruby on Rails 5 Basics Course

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.