Ruby on Rails Tutorial LiveLessons, 7th Edition

Ruby on Rails Tutorial LiveLessons, 7th Edition

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 269 Lessons (21h 09m) | 4.10 GB

The Ruby on Rails Tutorial 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.

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 thats simple enough to understand while still being useful.

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.

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 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.

Table of Contents

Introduction
1 Ruby on Rails Tutorial Introduction

Lesson 01 From Zero to Deploy
2 Topics
3 Beginning
4 Up and Running
5 Development Environment
6 Installing Rails
7 The First Application
8 Bundler
9 Rails Server
10 Model-View-Controller (MVC)
11 Hello, World!
12 Version Control with Git
13 Git Setup
14 What Good Does Git Do You
15 GitHub
16 Branch, Edit, Commit, Merge
17 Deploying
18 Heroku Setup and Deployment
19 Heroku Commands
20 Conclusion

Lesson 02 A Toy App
21 Topics
22 Beginning
23 Planning the Application
24 A Toy Model for Users
25 A Toy Model for Microposts
26 The Users Resource
27 A User Tour
28 MVC in Action
29 Weaknesses of This Users Resource
30 The Microposts Resource
31 A Micropost Microtour
32 Putting the micro in Microposts
33 A User has many Microposts
34 Inheritance Hierarchies
35 Deploying the Toy App
36 Conclusion

Lesson 03 Mostly Static Pages
37 Topics
38 Beginning
39 Sample App Setup
40 Static Pages
41 Generated Static Pages
42 Custom Static Pages
43 Getting Started with Testing
44 Our First Test
45 Red
46 Green
47 Refactor
48 Slightly Dynamic Pages
49 Testing Titles (Red)
50 Adding Page Titles (Green)
51 Layouts and Embedded Ruby (Refactor)
52 Setting the Root Route
53 Advanced Testing Setup
54 Minitest Reporters
55 Automated Tests with Guard
56 Conclusion

Lesson 04 Rails-Flavored Ruby
57 Topics
58 Beginning
59 Motivation
60 Built-in Helpers
61 Custom Helpers
62 Strings and Methods
63 Strings
64 Objects and Message Passing
65 Method Definitions
66 Back to the Title Helper
67 Other Data Structures
68 Arrays and Ranges
69 Blocks
70 Hashes and Symbols
71 CSS Revisited
72 Ruby Classes
73 Constructors
74 Class Inheritance
75 Modifying Built-in Classes
76 A Controller Class
77 A User Class
78 Conclusion

Lesson 05 Filling in the Layout
79 Topics
80 Beginning
81 Adding Some Structure
82 Site Navigation
83 Bootstrap and Custom CSS
84 Partials
85 Sass and the Asset Pipeline
86 The Asset Pipeline
87 Syntactically Awesome Stylesheets
88 Layout Links
89 Contact Page
90 Rails Routes
91 Using Named Routes
92 Layout Link Tests
93 User Signup A First Step
94 Users Controller
95 Signup URL
96 Conclusion

Lesson 06 Modeling Users
97 Topics
98 Beginning
99 User Model
100 Database Migrations
101 The Model File
102 Creating User Objects
103 Finding User Objects
104 Updating User Objects
105 User Validations
106 A Validity Test
107 Validating Presence
108 Length Validation
109 Format Validation
110 Uniqueness Validation
111 Adding a Secure Password
112 A Hashed Password
113 User Has Secure Password
114 Minimum Password Standards
115 Creating and Authenticating a User
116 Conclusion

Lesson 07 Sign Up
117 Topics
118 Beginning
119 Showing Users
120 Debug and Rails Environments
121 A Users Resource
122 Debugger
123 A Gravatar Image and a Sidebar
124 Signup Form
125 Using form with
126 Signup Form HTML
127 Unsuccessful Signups
128 A Working Form
129 Strong Parameters
130 Signup Error Messages
131 A Test for Invalid Submission
132 Successful Signups
133 The Finished Signup Form
134 The Flash
135 The First Signup
136 Test for Valid Submission
137 Professional-Grade Deployment
138 SSL in Production
139 Production Web Server
140 Production Database Configuration
141 Production Deployment
142 Conclusion

Lesson 08 Basic Login
143 Topics
144 Beginning
145 Sessions
146 Sessions Controller
147 Login Form
148 Finding and Authenticating a User
149 Rendering with a Flash Message
150 A Flash Test
151 Logging in
152 The log in Method
153 Current User
154 Changing the Layout Links
155 Menu Toggle
156 Mobile Styling
157 Testing Layout Changes
158 Login Upon Signup
159 Logging Out
160 Conclusion

Lesson 09 Advanced Login
161 Topics
162 Beginning
163 Remember Me
164 Remember Token and Digest
165 Login with Remembering
166 Forgetting Users
167 Two Subtle Bugs
168 “Remember Me” Checkbox
169 Remember Tests
170 Testing the “Remember Me” Box
171 Testing the Remember Branch
172 Conclusion

Lesson 10 Updating, Showing, and Deleting Users
173 Topics
174 Beginning
175 Updating Users
176 Edit Form
177 Unsuccessful Edits
178 Testing Unsuccessful Edits
179 Successful Edits (with TDD)
180 Authorization
181 Requiring Logged-in Users
182 Requiring the Right User
183 Friendly Forwarding
184 Showing All Users
185 Users Index
186 Sample Users
187 Pagination
188 Users Index Test
189 Partial Refactoring
190 Deleting Users
191 Administrative Users
192 The Destroy Action
193 User Destroy Tests
194 Conclusion

Lesson 11 Account Activation
195 Topics
196 Beginning
197 Account Activations Resource
198 Account Activations Controller
199 Account Activation Data Model
200 Account Activation Emails
201 Mailer Templates
202 Email Previews
203 Email Tests
204 Updating the Users create Action
205 Activating the Account
206 Generalizing the authenticated Method
207 Activation edit Action
208 Activation Tests and Refactoring
209 Email in Production
210 Conclusion

Lesson 12 Password Reset
211 Topics
212 Beginning
213 Password Resets Resource
214 Password Resets Controller
215 New Password Resets
216 Password Reset create Action
217 Password Reset Emails
218 Password Reset Mailer and Templates
219 Email Tests
220 Resetting the Password
221 Reset edit Action
222 Updating the Reset
223 Password Reset Test
224 Email in Production (take Two)
225 Conclusion

Lesson 13 User Microposts
226 Topics
227 Beginning
228 A Micropost Model
229 The Basic Model
230 Micropost Validations
231 UserMicropost Association
232 Micropost Refinements
233 Showing Microposts
234 Rendering Microposts
235 Sample Microposts
236 Profile Micropost Tests
237 Manipulating Microposts
238 Micropost Access Control
239 Creating Microposts
240 A Proto-Feed
241 Destroying Microposts
242 Micropost Tests
243 Micropost Images
244 Basic Image Upload
245 Image Validation
246 Image Resizing
247 Image Upload in Production
248 Conclusion

Lesson 14 Following Users
249 Topics
250 Beginning
251 The Relationship Model
252 A Problem with the Data Model (and a Solution)
253 Userrelationship Associations
254 Relationship Validations
255 Followed Users
256 Followers
257 A Web Interface for Following Users
258 Sample Following Data
259 Stats and a Follow Form
260 Following and Followers Pages
261 A Working Follow Button the Standard Way
262 A Working Follow Button with Hotwire
263 Following Tests
264 The Status Feed
265 Motivation and Strategy
266 A First Feed Implementation
267 Subselects and Eager Loading
268 Conclusion

Summary
269 Ruby on Rails Tutorial Summary

Homepage