| About the Author |
|
xiii | |
| Acknowledgments |
|
xv | |
| Introduction |
|
xvii | |
|
Chapter 1 First Things Rails |
|
|
1 | (56) |
|
|
|
1 | (3) |
|
|
|
4 | (4) |
|
Simplicity Through Conventions |
|
|
4 | (1) |
|
Increased Signal to Noise |
|
|
4 | (1) |
|
|
|
5 | (1) |
|
|
|
6 | (1) |
|
|
|
6 | (1) |
|
Maximizing Developer Happiness |
|
|
7 | (1) |
|
|
|
7 | (1) |
|
Rapid Application Development |
|
|
7 | (1) |
|
|
|
7 | (1) |
|
|
|
8 | (7) |
|
|
|
9 | (1) |
|
|
|
10 | (1) |
|
An Overview of the Project |
|
|
11 | (1) |
|
PostgreSQL 11 with PostGIS |
|
|
11 | (3) |
|
|
|
14 | (1) |
|
Integrated Development Environment |
|
|
14 | (1) |
|
|
|
15 | (32) |
|
|
|
16 | (1) |
|
|
|
16 | (2) |
|
|
|
18 | (2) |
|
Committing to Version Control |
|
|
20 | (2) |
|
|
|
22 | (3) |
|
|
|
25 | (2) |
|
|
|
27 | (7) |
|
|
|
34 | (4) |
|
|
|
38 | (9) |
|
|
|
47 | (4) |
|
Rails 6 vs. Rails 5: New Features |
|
|
51 | (5) |
|
Database Read/Write Switch |
|
|
51 | (1) |
|
|
|
52 | (1) |
|
|
|
52 | (1) |
|
Replanting Seed (and Truncation) |
|
|
53 | (1) |
|
|
|
54 | (1) |
|
Environment-Specific Credentials |
|
|
55 | (1) |
|
|
|
55 | (1) |
|
|
|
56 | (1) |
|
Chapter 2 Fundamental Ruby |
|
|
57 | (30) |
|
Interactive Ruby (irb) and Variables |
|
|
57 | (2) |
|
|
|
59 | (2) |
|
|
|
61 | (8) |
|
|
|
69 | (2) |
|
|
|
71 | (5) |
|
|
|
76 | (4) |
|
|
|
80 | (1) |
|
|
|
81 | (4) |
|
|
|
85 | (2) |
|
|
|
87 | (42) |
|
|
|
87 | (5) |
|
|
|
92 | (13) |
|
|
|
105 | (3) |
|
|
|
108 | (6) |
|
|
|
114 | (4) |
|
|
|
118 | (5) |
|
|
|
123 | (1) |
|
|
|
124 | (4) |
|
|
|
128 | (1) |
|
Chapter 4 Modeling the Models |
|
|
129 | (80) |
|
|
|
129 | (1) |
|
|
|
130 | (3) |
|
|
|
133 | (14) |
|
|
|
134 | (3) |
|
|
|
137 | (2) |
|
|
|
139 | (1) |
|
|
|
140 | (1) |
|
|
|
141 | (1) |
|
|
|
141 | (5) |
|
|
|
146 | (1) |
|
|
|
147 | (14) |
|
|
|
147 | (1) |
|
|
|
148 | (1) |
|
|
|
149 | (4) |
|
|
|
153 | (3) |
|
|
|
156 | (2) |
|
|
|
158 | (1) |
|
|
|
159 | (2) |
|
|
|
161 | (38) |
|
|
|
161 | (18) |
|
|
|
179 | (16) |
|
|
|
195 | (1) |
|
|
|
196 | (3) |
|
|
|
199 | (8) |
|
Factory Bot: Record Maker |
|
|
199 | (3) |
|
Automated Data Population |
|
|
202 | (2) |
|
|
|
204 | (1) |
|
|
|
205 | (1) |
|
|
|
206 | (1) |
|
|
|
207 | (2) |
|
Chapter 5 Session and Authentication |
|
|
209 | (52) |
|
|
|
209 | (6) |
|
|
|
215 | (2) |
|
|
|
217 | (2) |
|
Authentication with Devise |
|
|
219 | (29) |
|
|
|
219 | (3) |
|
|
|
222 | (6) |
|
Customizing the Sign-Up Page |
|
|
228 | (10) |
|
Customizing the Sign-in Page |
|
|
238 | (4) |
|
Customizing the Forgot Password Page |
|
|
242 | (3) |
|
Customizing the Reset Password Page |
|
|
245 | (3) |
|
|
|
248 | (6) |
|
|
|
254 | (5) |
|
|
|
259 | (2) |
|
Chapter 6 Building the Timeline |
|
|
261 | (56) |
|
|
|
262 | (28) |
|
|
|
262 | (1) |
|
|
|
263 | (11) |
|
Working on the Mass Timeline |
|
|
274 | (7) |
|
Using the Decorator Pattern |
|
|
281 | (3) |
|
|
|
284 | (4) |
|
Building the User's Timeline |
|
|
288 | (2) |
|
|
|
290 | (26) |
|
Preparing the User Interface |
|
|
290 | (7) |
|
|
|
297 | (6) |
|
Performing Request Testing |
|
|
303 | (2) |
|
|
|
305 | (11) |
|
|
|
316 | (1) |
|
Chapter 7 Picturesque Storage |
|
|
317 | (38) |
|
Hitchhiker's Guide to Active Storage |
|
|
317 | (3) |
|
Setting Up Active Storage |
|
|
318 | (1) |
|
|
|
318 | (2) |
|
|
|
320 | (18) |
|
Creating the Uploader Form |
|
|
321 | (9) |
|
|
|
330 | (3) |
|
|
|
333 | (5) |
|
|
|
338 | (8) |
|
|
|
339 | (1) |
|
Obtaining and Storing Credentials |
|
|
340 | (3) |
|
Configuring Active Storage to Use S3 |
|
|
343 | (3) |
|
Integration Testing with Capybara |
|
|
346 | (7) |
|
|
|
353 | (2) |
|
Chapter 8 Places and Queues |
|
|
355 | (64) |
|
Enter Vue.js and Webpacker |
|
|
355 | (4) |
|
Google Maps and Places API |
|
|
359 | (6) |
|
|
|
365 | (20) |
|
|
|
368 | (5) |
|
|
|
373 | (4) |
|
|
|
377 | (2) |
|
|
|
379 | (3) |
|
|
|
382 | (3) |
|
Centralizing States via the Vuex Store |
|
|
385 | (5) |
|
|
|
390 | (8) |
|
|
|
390 | (5) |
|
|
|
395 | (3) |
|
|
|
398 | (13) |
|
Crawling in the Background |
|
|
411 | (4) |
|
|
|
415 | (3) |
|
|
|
418 | (1) |
|
|
|
419 | (46) |
|
|
|
419 | (9) |
|
Respecting Privacy Through Authorization |
|
|
428 | (9) |
|
Follow Requests: Front End |
|
|
437 | (9) |
|
Processing Follow Requests |
|
|
446 | (4) |
|
|
|
450 | (2) |
|
Accepting and Rejecting Requests |
|
|
452 | (11) |
|
|
|
463 | (2) |
|
Chapter 10 A Well-Rounded Engineer |
|
|
465 | (64) |
|
|
|
465 | (10) |
|
|
|
475 | (12) |
|
Containerization: Hypersonic Setup |
|
|
487 | (9) |
|
Deploying to AWS Elastic Beanstalk |
|
|
496 | (30) |
|
Installing the Command-Line Interface |
|
|
497 | (1) |
|
Setting Up the Elastic Beanstalk App |
|
|
498 | (7) |
|
|
|
505 | (10) |
|
Configuring the Application |
|
|
515 | (7) |
|
|
|
522 | (3) |
|
|
|
525 | (1) |
|
|
|
526 | (1) |
|
Performance, Metrics, and Monitoring |
|
|
526 | (1) |
|
|
|
527 | (2) |
| Appendix: Validations |
|
529 | (2) |
| Index |
|
531 | |