Video description
19+ Hours of Video Instruction
The Ruby on Rails TutorialTM LiveLessons, Seventh Edition, is the best-selling complete video training course on web development with Rails, the popular web framework for building dynamic, database-backed web applications. You learn Rails by example by building a substantial sample application from scratch.
Overview
Best-selling author and leading Rails developer Michael Hartl teaches Rails by guiding you through the development of three sample applications of increasing sophistication, focusing on the fundamental techniques in web development needed for virtually any kind of application. The updates to this edition include full compatibility with Rails 7 and numerous new exercises interspersed in each lesson for maximum reinforcement. This indispensable guide provides integrated tutorials not only for Rails, but also for the essential Ruby, HTML, CSS, and SQL skills you need when developing web applications. Hartl explains how each new technique solves a real-world problem, and then he demonstrates it with bite-sized code that’s simple enough to understand while still being useful.
About the Instructor
Michael Hartl is the creator of the Ruby on Rails Tutorial, one of the leading introductions to web development, and is cofounder and principal author at Learn Enough. Previously, he was a physics instructor at the California Institute of Technology (Caltech), where he received a Lifetime Achievement Award for Excellence in Teaching. He is a graduate of Harvard College, has a PhD in Physics from Caltech, and is an alumnus of the Y Combinator entrepreneur program.
Skill Level
Learn How To
- Install and set up your Rails development environment
- Utilize the optional easy start using pre-installed IDE in the cloud
- Build Rails applications from scratch
- Test and use test-driven development (TDD)
- Effectively use the model-view-controller (MVC) pattern
- Structure applications using REST architecture
- Build static pages and transform them into dynamic ones
- Implement registration and authentication systems, including validation and secure passwords
- Deploy your application
Who Should Take This Course
- Developers looking for a practical introduction for building dynamic, database-backed web applications with Rails
Course Requirements
- No formal prerequisites, but some background in developer tools (command line, text editor) and web technologies (HTML) is helpful
- Some Ruby background is useful but not required
Lesson Descriptions
Lesson 1: From Zero to Deploy
The first lesson teaches you how to set up an integrated development in the cloud, create a first Rails application, and deploy it to production with Git and Heroku.
Lesson 2: A Toy App
In this lesson, you get up and running quickly with a toy application that demonstrates the basic workings of a Rails application with users and short posts. It includes a focus on interacting with the toy app through its URIs (often called URLs) using a web browser. You learn how to generate dynamic web pages using the MVC pattern and structure web applications using the REST architecture.
Lesson 3: Mostly Static Pages
This lesson focuses on developing the industrial-strength sample application that is used throughout the rest of the video. You begin by creating static pages and then move on to adding a little dynamic content. After writing all the code from scratch, you get your first taste of testing and test-driven development (TDD).
Lesson 4: Rails-Flavored Ruby
In this lesson, you learn the basics of Ruby, the programming language underlying Rails. The focus is on the aspects of Ruby most useful for Rails development, including strings, arrays, hashes, and Ruby classes.
Lesson 5: Filling in the Layout
This lesson incorporates Twitter’s Bootstrap framework into the sample application, adds custom styles, and fills in the layout with links to the pages created so far. Topics covered include partials, Rails routes, the asset pipeline, Sass, and an introduction to end-to-end testing with integration tests.
Lesson 6: Modeling Users
This lesson demonstrates how to create a data model for the site’s users and to persist user data using a database back-end. You learn how to implement data validations and add a secure password to allow login and authentication.
Lesson 7: Sign Up
The development of the sample app continues by giving users the capability to sign up for the site and create a user profile. You also learn how to make a signup form with error messages for invalid submission and implement successful user registration for valid submission.
Lesson 8: Basic Login
Now that new users can sign up for the site, it’s time to give them the ability to log in and log out. In this lesson, you learn how to implement the simplest fully functional login model, which keeps users logged in for one session at a time, automatically expiring the sessions when users close their browsers.
Lesson 9: Advanced Login
In this lesson, you build on the login system from Lesson 8 to add the ability to remember the users’ login status even after they close their browsers. You also learn how to automatically remember users, and then how to optionally remember them based on the value of a remember-me checkbox.
Lesson 10: Updating, Showing, and Deleting Users
In this lesson, we complete the REST actions for the Users resource by adding edit, update, index, and destroy actions. We also put the login system to good use by restricting certain actions to logged-in users or administrative users.
Lesson 11: Account Activation
In Lesson 10, you finished making a basic user resource together with the flexible authentication and authorization system. In this lesson and the next, you learn how to put the finishing touches on this system, starting with an account activation feature that verifies each new user’s email address. This will involve creating a new resource, thereby giving you a chance to see further examples of controllers, routing, and database migrations. In the process, you also learn how to send email in Rails, both in development and in production.
Lesson 12: Password Reset
In this lesson, you learn how to give users the ability to reset their passwords if they forget them. The implementation closely parallels the account activations from Lesson 11, providing yet another example of creating a Rails resource from scratch, as well as a second example of sending email in production.
Lesson 13: User Microposts
This lesson demonstrates how to make a data model for short posts (“microposts”), make a page to show a list of microposts, and implement a web interface to create and delete microposts. You then learn how to upload images and associate them to microposts, including image resizing, format validations, and production deployment using a cloud storage service (Amazon Web Services S3).
Lesson 14: Following Users
The final lesson completes the core sample application by adding a social layer for users to follow and unfollow other users. You learn how to make a data model between users, give users the capability to follow each other through the web (including an introduction to Hotwire and Turbo), and create a status feed of the microposts from the users.
About Pearson Video Training
Pearson publishes expert-led video tutorials covering a wide selection of technology topics designed to teach you the skills you need to succeed. These professional and personal technology videos feature world-leading author instructors published by your trusted technology brands: Addison-Wesley, Cisco Press, Pearson IT Certification, Sams, and Que Topics include: IT Certification, Network Security, Cisco Technology, Programming, Web Development, Mobile Development, and more. Learn more about Pearson Video training at http://www.informit.com/video
.
Table of Contents
Introduction
Ruby on Rails Tutorial: Introduction
Lesson 1: From Zero to Deploy
Topics
1.0.0 Beginning
1.1.0 Up and Running
1.1.1 Development Environment
1.1.2 Installing Rails
1.2.0 The First Application
1.2.1 Bundler
1.2.2 Rails Server
1.2.3 Model-View-Controller (MVC)
1.2.4 Hello, World!
1.3.0 Version Control with Git
1.3.1 Git Setup
1.3.2 What Good Does Git Do You?
1.3.3 GitHub
1.3.4 Branch, Edit, Commit, Merge
1.4.0 Deploying
1.4.1 Heroku Setup and Deployment
1.4.2 Heroku Commands
1.5.0 Conclusion
Lesson 2: A Toy App
Topics
2.0.0 Beginning
2.1.0 Planning the Application
2.1.1 A Toy Model for Users
2.1.2 A Toy Model for Microposts
2.2.0 The Users Resource
2.2.1 A User Tour
2.2.2 MVC in Action
2.2.3 Weaknesses of This Users Resource
2.3.0 The Microposts Resource
2.3.1 A Micropost Microtour
2.3.2 Putting the micro in Microposts
2.3.3 A User has_many Microposts
2.3.4 Inheritance Hierarchies
2.3.5 Deploying the Toy App
2.4.0 Conclusion
Lesson 3: Mostly Static Pages
Topics
3.0.0 Beginning
3.1.0 Sample App Setup
3.2.0 Static Pages
3.2.1 Generated Static Pages
3.2.2 Custom Static Pages
3.3.0 Getting Started with Testing
3.3.1 Our First Test
3.3.2 Red
3.3.3 Green
3.3.4 Refactor
3.4.0 Slightly Dynamic Pages
3.4.1 Testing Titles (Red)
3.4.2 Adding Page Titles (Green)
3.4.3 Layouts and Embedded Ruby (Refactor)
3.4.4 Setting the Root Route
3.5.0 Advanced Testing Setup
3.5.1 Minitest Reporters
3.5.2 Automated Tests with Guard
3.6.0 Conclusion
Lesson 4: Rails-Flavored Ruby
Topics
4.0.0 Beginning
4.1.0 Motivation
4.1.1 Built-in Helpers
4.1.2 Custom Helpers
4.2.0 Strings and Methods
4.2.1 Strings
4.2.2 Objects and Message Passing
4.2.3 Method Definitions
4.2.4 Back to the Title Helper
4.3.0 Other Data Structures
4.3.1 Arrays and Ranges
4.3.2 Blocks
4.3.3 Hashes and Symbols
4.3.4 CSS Revisited
4.4.0 Ruby Classes
4.4.1 Constructors
4.4.2 Class Inheritance
4.4.3 Modifying Built-in Classes
4.4.4 A Controller Class
4.4.5 A User Class
4.5.0 Conclusion
Lesson 5: Filling in the Layout
Topics
5.0.0 Beginning
5.1.0 Adding Some Structure
5.1.1 Site Navigation
5.1.2 Bootstrap and Custom CSS
5.1.3 Partials
5.2.0 Sass and the Asset Pipeline
5.2.1 The Asset Pipeline
5.2.2 Syntactically Awesome Stylesheets
5.3.0 Layout Links
5.3.1 Contact Page
5.3.2 Rails Routes
5.3.3 Using Named Routes
5.3.4 Layout Link Tests
5.4.0 User Signup: A First Step
5.4.1 Users Controller
5.4.2 Signup URL
5.5.0 Conclusion
Lesson 6: Modeling Users
Topics
6.0.0 Beginning
6.1.0 User Model
6.1.1 Database Migrations
6.1.2 The Model File
6.1.3 Creating User Objects
6.1.4 Finding User Objects
6.1.5 Updating User Objects
6.2.0 User Validations
6.2.1 A Validity Test
6.2.2 Validating Presence
6.2.3 Length Validation
6.2.4 Format Validation
6.2.5 Uniqueness Validation
6.3.0 Adding a Secure Password
6.3.1 A Hashed Password
6.3.2 User Has Secure Password
6.3.3 Minimum Password Standards
6.3.4 Creating and Authenticating a User
6.4.0 Conclusion
Lesson 7: Sign Up
Topics
7.0.0 Beginning
7.1.0 Showing Users
7.1.1 Debug and Rails Environments
7.1.2 A Users Resource
7.1.3 Debugger
7.1.4 A Gravatar Image and a Sidebar
7.2.0 Signup Form
7.2.1 Using form_with
7.2.2 Signup Form HTML
7.3.0 Unsuccessful Signups
7.3.1 A Working Form
7.3.2 Strong Parameters
7.3.3 Signup Error Messages
7.3.4 A Test for Invalid Submission
7.4.0 Successful Signups
7.4.1 The Finished Signup Form
7.4.2 The Flash
7.4.3 The First Signup
7.4.4 Test for Valid Submission
7.5.0 Professional-Grade Deployment
7.5.1 SSL in Production
7.5.2 Production Web Server
7.5.3 Production Database Configuration
7.5.4 Production Deployment
7.6.0 Conclusion
Lesson 8: Basic Login
Topics
8.0.0 Beginning
8.1.0 Sessions
8.1.1 Sessions Controller
8.1.2 Login Form
8.1.3 Finding and Authenticating a User
8.1.4 Rendering with a Flash Message
8.1.5 A Flash Test
8.2.0 Logging in
8.2.1 The log_in Method
8.2.2 Current User
8.2.3 Changing the Layout Links
8.2.4 Menu Toggle
8.2.5 Mobile Styling
8.2.6 Testing Layout Changes
8.2.7 Login Upon Signup
8.3.0 Logging Out
8.4.0 Conclusion
Lesson 9: Advanced Login
Topics
9.0.0 Beginning
9.1.0 Remember Me
9.1.1 Remember Token and Digest
9.1.2 Login with Remembering
9.1.3 Forgetting Users
9.1.4 Two Subtle Bugs
9.2.0 âRemember Meâ Checkbox
9.3.0 Remember Tests
9.3.1 Testing the âRemember Meâ Box
9.3.2 Testing the Remember Branch
9.4.0 Conclusion
Lesson 10: Updating, Showing, and Deleting Users
Topics
10.0.0 Beginning
10.1.0 Updating Users
10.1.1 Edit Form
10.1.2 Unsuccessful Edits
10.1.3 Testing Unsuccessful Edits
10.1.4 Successful Edits (with TDD)
10.2.0 Authorization
10.2.1 Requiring Logged-in Users
10.2.2 Requiring the Right User
10.2.3 Friendly Forwarding
10.3.0 Showing All Users
10.3.1 Users Index
10.3.2 Sample Users
10.3.3 Pagination
10.3.4 Users Index Test
10.3.5 Partial Refactoring
10.4.0 Deleting Users
10.4.1 Administrative Users
10.4.2 The Destroy Action
10.4.3 User Destroy Tests
10.5.0 Conclusion
Lesson 11: Account Activation
Topics
11.0.0 Beginning
11.1.0 Account Activations Resource
11.1.1 Account Activations Controller
11.1.2 Account Activation Data Model
11.2.0 Account Activation Emails
11.2.1 Mailer Templates
11.2.2 Email Previews
11.2.3 Email Tests
11.2.4 Updating the Users create Action
11.3.0 Activating the Account
11.3.1 Generalizing the authenticated? Method
11.3.2 Activation edit Action
11.3.3 Activation Tests and Refactoring
11.4.0 Email in Production
11.5.0 Conclusion
Lesson 12: Password Reset
Topics
12.0.0 Beginning
12.1.0 Password Resets Resource
12.1.1 Password Resets Controller
12.1.2 New Password Resets
12.1.3 Password Reset create Action
12.2.0 Password Reset Emails
12.2.1 Password Reset Mailer and Templates
12.2.2 Email Tests
12.3.0 Resetting the Password
12.3.1 Reset edit Action
12.3.2 Updating the Reset
12.3.3 Password Reset Test
12.4.0 Email in Production (take Two)
12.5.0 Conclusion
Lesson 13: User Microposts
Topics
13.0.0 Beginning
13.1.0 A Micropost Model
13.1.1 The Basic Model
13.1.2 Micropost Validations
13.1.3 User/Micropost Association
13.1.4 Micropost Refinements
13.2.0 Showing Microposts
13.2.1 Rendering Microposts
13.2.2 Sample Microposts
13.2.3 Profile Micropost Tests
13.3.0 Manipulating Microposts
13.3.1 Micropost Access Control
13.3.2 Creating Microposts
13.3.3 A Proto-Feed
13.3.4 Destroying Microposts
13.3.5 Micropost Tests
13.4.0 Micropost Images
13.4.1 Basic Image Upload
13.4.2 Image Validation
13.4.3 Image Resizing
13.4.4 Image Upload in Production
13.5.0 Conclusion
Lesson 14: Following Users
Topics
14.0.0 Beginning
14.1.0 The Relationship Model
14.1.1 A Problem with the Data Model (and a Solution)
14.1.2 User/relationship Associations
14.1.3 Relationship Validations
14.1.4 Followed Users
14.1.5 Followers
14.2.0 A Web Interface for Following Users
14.2.1 Sample Following Data
14.2.2 Stats and a Follow Form
14.2.3 Following and Followers Pages
14.2.4 A Working Follow Button the Standard Way
14.2.5 A Working Follow Button with Hotwire
14.2.6 Following Tests
14.3.0 The Status Feed
14.3.1 Motivation and Strategy
14.3.2 A First Feed Implementation
14.3.3 Subselects and Eager Loading
14.4.0 Conclusion
Summary
Ruby on Rails Tutorial: Summary