Index

Symbols

-v flag, 13

@user variables, 338, 387, 388

<title> tag, 135

& (ampersands), 809

, (commas), 290

@ signs, 290, 573

@import function, 219

@session variable, 387

(backslash), 169, 170

&& statements, 405

# (pound sign), 166

== operator, 254

>= notation, 21

||= (“or equals”) assignment operator, 404

~> notation, 21, 22

A

About page

HTML (Hypertext Markup Language), 148

testing, 131

views, 140, 145

acceptance tests, 505, 506

accessing

access control tests, 795

activation tokens, 563

friendly forwarding, 521

login, 381 (see also login)

microposts, 96, 694697

programmatic access, 746

protected pages, 512

synonyms, 178

user administrative, 747

account activation, 559560

activating accounts, 585610

activation edit action, 590594

adding, 602

authenticated? method, 585590

broken-up activation tests, 600603

controllers, 561562

data models, 562568

email, 568585 (see also email)

refactoring, 594610

refactoring activation code, 604610

resources, 560568

sending email, 618

testing, 594610

token callbacks, 564566

Account dropdown menus, 413

actions, 81, 115

adding, 245

controllers, 30, 79, 83

create, 346, 362, 382, 383, 391, 401, 493, 525, 581585, 630633, 696, 697, 698, 797

destroy, 382, 383, 549552, 696, 719, 797

edit, 324, 494, 495, 561, 590594, 623, 641644

followers, 776, 788

following, 776, 788

hello, 80, 113

help, 120

home, 120, 709

index, 80, 84, 85, 527, 529

new, 338, 382, 383, 493, 623

show, 83, 326

update, 83, 501, 507, 561, 646

activated users, displaying, 608

activating Turbo, 800

Active Record, 98, 265, 273, 560

associations, 667

commands, 274

finding objects, 276277

uniqueness validations, 297

where method, 808

active relationships, 759, 760, 761

implementation, 764

Active Storage, 726, 727, 749

interfaces, 728

validations, 733

active users, 607. See also users

Add user pages, navigating, 746

adding

account activation, 602

actions, 245

Amazon AWS storage, 749

authenticated? method, 456

authorization, 697

belongs_to method, 765

Bootstrap CSS, 219

code, 210, 320

CSS (Cascading Style Sheets), 219, 223, 224

debug information, 317318

delete links, 716

digest method, 429

dynamic content, 107

extra size to cloud IDEs, 14

faker gem, 533

feed instance variables, 709

files, 117

flash messages, 365368

follow forms, 783

following association, 768

following/follower relationships, 774

footers, 229, 230

forget method, 463

gems, 218, 733, 740

gravatar_for helper, 530

images, 217, 728, 730

inactive users, 609

indices, 762

irb configuration, 165

JavaScript, 413

length validations, 287

links, 209, 626

log_in_as helpers, 478479

logged_in_user method, 510

logos, 224

mailers, 560, 568

markup, 421

microposts, 683, 685, 699, 701, 721

options hashes, 335

password reset methods, 648

passwords, 306, 307

relationship model validations, 767

remember me checkboxes, 471, 472

remember method, 451

repositories, 46

resized display images, 741

resources, 384, 625

root routes for users, 81

routes, 562, 782

routes to Contact pages, 244

secure passwords, 303313

session token methods on users, 488, 520

sidebars, 333334

spacing, 221

statistics, 779, 783

status feeds, 710

store_location method, 523

structure to layouts, 207232

styles, 209, 221, 223

titles, 138142

URLs (Uniform Resource Locators), 498, 530

users, 74, 214, 516, 540

Users resources, 324, 327

@user variables, 338

validations to images, 734

viewport meta tags, 420

addresses array, 288

admin attribute, 545, 546, 548

administrative users, 544548

advanced login, 445. See also login

bugs, 465470

forgetting users, 462464

login with remembering, 453462

remember digests, 446453

remember me behavior, 445470

remember me branches, 483489

remember me checkboxes, 470476

remember tokens, 446453

testing remember me, 476489

alert method, 735

alerts, JavaScript, 737

allowing

connections, 113

empty passwords, 507

valid image formats, 736

Amazon Web Services. See AWS (Amazon Web Services)

ampersands (&), 809

annotations, comments, 176

anonymous functions, 677

API keys, 612, 616, 617

Application controllers, 31

Sessions helper module in, 399

Application helper, 254

ApplicationController class, 101

applications (apps), 1, 2

applying bundler, 1728

deploying Rails, 5261

design, 218

hello, 3

hello, world!, 3035

Heroku setup, 5459

layouts, 160 (see also layouts)

mailers, 570, 571

MVC (model-view-controller), 2830

opening, 30

previewing, 26

profiles, 316 (see also profiles)

pushing, 114

sample app, 5, 208

setup, 107115

site layouts, 146

starting, 1435

strings, 167174 (see also strings)

toy, 4

toy demo, 6566 (see also toy demo application)

viewing, 30

applying

Bundler, 1728

flash, 74

form_with, 337341

Gemfiles, 23

key–value pairs, 812

MiniMagick, 740

named routes, 248251

SendGrid, 611

SQLite, 110

version control, 4142

architecture

MVC (model-view-controller), 32

REST (REpresentational State Transfer), 65, 83 (see also REST [REpresentational State Transfer])

arguments, 174

command-line, 119

defaults, 174

keywords, 336

arrays, 177181

addresses, 288

mutating, 179

ascending order, 676

assert_difference method, 553, 554

assert_match method, 579, 793

assert_select method, 252, 253

assert_template method, 251

asset pipeline, 232235

assigns method, 601

associations, 93, 95

Active Record, 667

following, 768, 770

has_many :through, 767, 768

has_many relationship, 764

microposts, 670674, 791

searching microposts, 718

user/relationship, 763766

associative arrays, 185. See also hashes

at (@) signs, 290, 573

attach method, 729

attacks, sessions replay, 400

attributes

accessors, 202

adding activation, 563

admin, 545, 546, 548

email, 284, 285, 287, 301

hover, 236, 237

microposts, 664666

name, 344, 345, 349

password reset, 628

password_digest, 539

remember_digest, 447, 448

authenticate method, 304, 447

authenticated? method, 456, 468, 469, 585590

authentication, 87, 263, 310313

code, 432

before filters, 493

login, 389393

sessions, 382

users, 303

authorization, 509526

adding, 697

friendly forwarding, 521526

microposts, 694

models, 381

requiring logged-in users, 509515

requiring the right user, 515521

testing, 786

automated testing, 107, 126

automatic destruction, 663

AWS (Amazon Web Services), 7, 8, 743, 744

adding, 749

buckets, 748

configuration, 744748, 750

creating environments, 8

interfaces, 745

naming environments, 9

production, 748752

regions, 749

signup, 745

B

backslash (), 169, 170

base titles, 161

bcrypt function, 305, 306, 455

before filters, 493, 509, 517

before_action command, 509

before_save callback, 564, 565

behavior, remember me, 445470

belongs_to method, 663, 670, 672, 765

BitBucket, 446

body tag, 145

Bootstrap CSS, 213, 239, 333

branches

configuring names, 38

GitHub, 4849

breaking up long tests, 595600

broken-up activation tests, 600603

browser reload-page button, 47

browsers. See also interfaces

loading pages, 215

redirecting, 361

remember token cookies, 461, 462

remember where I left off feature, 437

buckets, AWS

Budri, Abdullah, 672

built-in classes, modifying, 197199

built-in helpers, 160161

bundle command, 16

bundle config command, 55

bundle install command, 25

bundler gem, 13

Bundler, applying, 1728

buttons

follow, 755 (see also following users)

unfollow, 759

C

caches, GitHub, 42

callbacks

before_save, 564, 565

defining, 300

implementation, 303

tokens, 564566

capybara gem, 21

Cascading Style Sheets. See CSS (Cascading Style Sheets)

case sensitivity, testing, 296

cd command, 14

CGI module escapes, 574

chaining methods, 172

change method, 268

checkboxes

nesting, 470

remember me, 445, 470476

testing, 476483

checkout command, 38, 42

classes, 81, 123, 192204

ApplicationController, 101

constructors, 192193

container, 214

controllers, 199201

CSS (Cascading Style Sheets), 211

defining, 195

hierarchies, 193

inheritance, 193197, 271

inheritance hierarchies, 196

instances, 193

methods, 193, 428

MicropostController, 101

modifying built-in, 197199

TestCase, 477

User, 202204

UsersController, 100

ValidLogin, 597

clicking menus, 424

clients, 121, 769

closures, 183. See also blocks

cloud IDEs (Integrated Development Environments), 5, 107, 108

defaults, 12

downloading files, 269

login, 416

sizing, 14

Cloud9, 8. See also AWS (Amazon Web Services)

creating environments, 8

naming environments, 9

code

adding, 210, 320

authentication, 432

avoiding repetition, 696

building microposts, 673

clients, 769

comments, 226

executing, 144

for failed logins, 397

generated code, 66

generating, 118

JavaScript, 414, 422

login forms, 387388, 628

refactoring, 107

refactoring activation, 604610

technical sophistication and, 6

templates, 607

testing, 127 (see also testing)

undoing, 118

URLs (uniform resource locators) forwarding, 523

viewing error messages, 353

writing small code, 66

collaboration, 2, 9

colors

modifying, 225

synonyms, 225

columns, 265

command-line

arguments, 119

heroku command-line interface, 56

Rails consoles, 165

terminals, 7

Unix, 2

commands

Active Record, 274

before_action, 509

bundle, 16

bundle config, 55

bundle install, 25

cd, 14

checkout, 38, 42

commit, 40

config:set, 614

gem, 12, 21

generate, 665

git branch, 49, 51, 52

git push, 46

Heroku, 5961

installation, 411, 412

ls, 41

mkdir, 14

rails, 13, 17, 129

rails new, 14, 16, 66, 136

rails server, 2527

SQL (Structured Query Language), 274

which, 739

commas (,), 290

comments

annotations, 176

authentication code, 432

code, 226

failing email tests, 582

filters, 513

moving, 167

Ruby, 166

uncommenting, 515

commit command, 40

commit sequences, 117

compatibility, 23, 24

config directory, 120

config:set command, 614

configuration, 5

applications (apps), 107115, 611

AWS (Amazon Web Services), 744748, 750

branch names, 38

email, 574

first-time repository setup, 3941

first-time system setup, 3739

Git, 3641

indentation, 13

irb, 165

native systems, 6

production database, 377378

root routes, 114, 149152

saving passwords, 39

session tokens on login, 488

site navigation, 209217

SSL (Secure Sockets Layer), 375

test domain hosts, 580

confirmation, 279

passwords, 303, 332

connections

allowing, 25, 113

SSL (Secure Sockets Layer), 374376

consoles

defining classes, 195

navigating, 165, 166

Rails, 95, 165

constructors, 192193

Contact page links, 243245

container class, 214

Content Security Policy. See CSP (Content Security Policy)

contents, listing, 41

control

flow, 171

versions, 3536, 265

controllers, 81, 82, 115

Account Activation, 561562

actions, 30, 79, 83

application, 31

classes, 199201

debuggers, 328

generating, 116, 118

Micropost resource, 89

microposts, 694

password reset, 624627

rails, 29

Relationship, 796

relationship between models and, 84

sessions, 382386

show action, 326

static pages, 122

testing, 128, 129

Users, 8283, 255257

conventions. See also guidelines

extra spaces, 186

names, 267

convert command-line utility, 739, 740

cookies

encryption, 454

expiration, 454

sessions, 398

stealing, 446

temporary, 400

cookies method, 446

copying comments, 167

correct_user method, 517, 518, 519

cost parameters, 428

count method, 683

create action, 346, 362, 382, 383, 391, 401, 493, 696, 697, 698, 797

friendly forwarding, 525

password reset, 630633

updating, 581585

create_activation_digest method, 564

create_table method, 268

create! method, 534

created_at method, 676

creating. See formatting

cross-site request forgery. See CSRF (cross-site request forgery)

cross-site scripting. See XSS (cross-site scripting)

cryptography, 446

CSP (Content Security Policy), 147

CSRF (cross-site request forgery), 147

CSS (Cascading Style Sheets), 2, 190191, 207

adding, 219, 223, 224

Bootstrap CSS, 213, 217226

classes, 211

custom CSS, 217226

error messages, 356

footers updating, 425

microposts, 687

remember me checkboxes, 473

rules, 208, 222

Sass language (see Sass language)

sidebars, 334

signup forms, 339 (see also forms; signup)

users index, 530

curl utility, 215

current users, login, 402406

current_user method, 402, 459, 460, 483, 484, 487

custom helpers, 161165

customization

Bootstrap CSS, 239

fixtures, 428

Gravatar (globally recognized avatar) images, 333

HTML (Hypertext Markup Language), 124

JavaScript, 415

rules, 222

static pages, 124126

D

data definition language. See DDL (data definition language)

data models

account activation, 562568

implementing, 87, 88

toy demo application, 7071

troubleshooting, 757763

data structures, 177191

arrays, 177181

blocks, 181185

hashes, 185190

ranges, 177181

symbols, 185190

data validation, 86

data, showing, 777

databases, 82, 265

communicating with objects, 99

ignoring files, 130

indices, 297298

migrating, 73, 267

migrations, 265271, 727

password resets, 622 (see also password reset)

production database configuration, 377378

remember digests, 450

reset, 568

seeding, 533, 534

DB Browser, 270

DDL (data definition language), 265

debug environments, 316322

debug methods, 328

debugging

login, 390

signup, 328330, 349

decryption, 455

default_scope method, 676

defaults

arguments, 174

cloud IDEs (Integrated Development Environments), 12

databases, 265

environments, 318

Gemfile directory, 19

ordering, 663

Rails page, 31

README file, 48

routing files, 33

scope, 674678

values, 193, 203

defining

callbacks, 300

classes, 195

gravatar_for helper function, 330, 331, 336

methods, 174176

relationship models, 760

root routes, 245

titles, 162

tokens, 452, 453

user actions/views, 326

variables, 238

delete links

adding, 716

Home pages, 721

mockups, 717

DELETE requests, 121, 122, 382, 383, 408, 549

deleting, 544555

administrative users, 544548

destroy action, 549552

exceptions, 486

microposts, 718

posts, 722

relationship fixtures, 767

user destroy tests, 552555

user mismatches, 723

deployment

Heroku, 5459

production database configuration, 377378

production deployment, 378379

production web servers, 376377

professional-grade, 374379

Rails, 5261

SSL (Secure Sockets Layer), 374376

toy demo application, 102104

users, 81

design. See also layouts

applications (apps), 218

encryption, 304

destroy action, 382, 383, 549552, 696, 719, 797

destroying

automatic destruction, 663

microposts, 716720

relationships, 759, 783, 801

sessions, 438

users, 678679

developer tools, Safari, 417, 418, 419

development, 2. See also web development

email settings in, 574

environments, 7, 166 (see also IDEs [Integrated Development Environments])

native systems, 6

RESTful style of, 84

tools, 8 (see also tools)

Devise gem, 263

digest method, 428, 429, 449

digests

password resets, 627, 657

passwords, 456

directories

asset pipeline, 232233

config, 120

environment, 14

gemfile, 1821

hello_app, 1821

structures, 17, 18

displaying. See also viewing

activated users, 608

error messages, 353

sizing, 739

users, 316 (see also signup)

div tag, 211, 212, 213

do keyword, 342

doctypes, 210

documents

Active Storage, 727

types, 137

domain hosts, 580

Don’t Repeat Yourself principle. See DRY (Don’t Repeat Yourself) principle

downcase method, 331, 393

downcasing email, 302

downloading

files, 269

fixture images, 732

images, 217

dropdown menus, 413, 416

DRY (Don’t Repeat Yourself) principle, 142, 422

duck typing, 277

duplicate email addresses, 294

duplicate feed items, testing, 819

dynamic content

adding, 107

profiles, 316 (see also profiles)

slightly dynamic pages, 135142

E

each method, 182, 188, 288

eager loading, 812821

edit action, 324, 494, 495, 561, 623

account activation, 590594

password reset, 641644

edit forms, 494501

editing. See also updating users

Gravatar (globally recognized avatar) images, 505

README file, 4951

successful edits (with TDD), 505509

unsuccessful edits, 501504

users, 703

editors, text, 7, 19

efficiency in production, 234

elements, synonyms, 178

email attribute, 284, 285, 287, 301

emails. See also uniqueness validations

account activation, 568585

configuration, 574

downcasing, 302

duplicate email addresses, 294

indexes, 298

invalid addresses, 633

mailer templates, 569574

password reset, 634641

password resets, 622 (see also password reset)

previews, 574577

in production, 610618, 658659

sending, 604

testing case sensitivity, 296

testing valid user, 432

tests, 577581

tests, password resets, 640641

updating create action, 581585

validation, 289

embedded Ruby. See ERb (embedded Ruby)

empty (nil) passwords, 357

empty passwords, updating, 507

empty? method, 171, 355

encryption. See also security

cookies, 454

passwords, 304

environment directory, 14

environments. See also cloud IDEs (Integrated Development Environments)

creating, 8

debug, 316322

defaults, 318

development, 166

naming, 9

Rails, 316322

ERb (embedded Ruby), 142149, 234, 539, 788

flash messages, 373

templates, 680

views, 142, 143

error messages, 94, 284, 502

login, 393398

microposts, 702

unsuccessful signups, 353358

errors

refreshing, 715

routing, 714

updating, 703

escape method, 574

escaping emails, 574

evaluation, short-circuit, 405

exceptions, 276

deleting, 486

untested branches, 484

executing code, 144

expiration

cookies, 454

password resets, 627

explicit calls, 788

explicit versions, 22. See also versions

expressions

regular, 290

Rublar regular expression editor, 292

extra spaces, conventions, 186

Ezeilo, Sunday Uche, 769

F

Fahnestock, Jack, 461

failures. See also troubleshooting

login, 386, 390, 394

microposts, 710

password reset, 649

signup (see unsuccessful signups)

faker gem, 533

feed method, 706

feeds

adding instance variables, 709

microposts, 706

proto-feeds, 717 (see also proto-feeds)

status, 693, 707, 709, 710, 805821 (see also status feeds)

Fielding, Roy, 83

fields, hidden, 642

files, 19. See also directories

adding, 117

adding JavaScript, 413

adding Users resources, 324

downloading, 269

fixtures, 516 (see also fixtures)

helper, 162

ignoring database, 130

layouts, 146

LICENSE, 110

manifest, 233235, 412

migrations, 267

missing, 42

models, 271272

README, 110, 111 (see README file)

routes, 119

routing, 33

filesystem navigators, 7

filters

before, 493, 509, 517

comments, 513

uncommenting, 515

Find in Files global search, 7

finding. See searching

finished signup forms, 362364

first signups, 368369

first-time repository setup, 3941

first-time system setup, 3739

fixations, sessions, 400, 518

fixtures, 427, 428

activating users, 567

adding users, 516, 540

downloading images, 732

following/follower tests, 792

microposts, 667, 675

testing user logins, 429

flash

applying, 74

login, 393398

messages, 365368

persistence, 396, 397

testing, 394398

follow buttons, 755

working follow buttons, 794802

follow forms, 775785

follow method, 796

followers action, 776, 788

followers tables, 758

following action, 776, 788

following association, 768, 770

following users, 755756

adding statistics, 779

followed users, 767771

followers, 771773

following tests, 803805

following/followers pages, 785794

relationship models, 756773 (see also relationship models)

sample following data, 774775

statistics, 775785

status feeds, 805821

testing authorization, 786

user/relationship associations, 763766

users to follow, 757

validations, 766767

web interfaces, 774805

working follow buttons, 794802

following_ids method, 810

foo, 167, 169

footers

adding, 229, 230

mobile styles, 426

partials, 228, 249

updating, 425

foreign keys, 764

forget method, 463

forgetting users, 462464

forgot passwords, 621623, 630, 633. See also password reset; passwords

form tag, 345

form_with, 337341

format validations, 279, 288294

formatting

microposts, 697705

mockups (see mockups)

relationships, 759

repositories, 43, 112

signup pages, 255260

static pages, 115

titles, 161

users, 746

working follow buttons, 794802

forms

adding images, 728

adding remember me checkboxes, 471, 472

creating microposts, 700

creating new password resets, 624

edit forms, 494501

errors, 706

finished signup forms, 362364

follow, 775785

forgot password, 623, 624, 630, 633

form_with, 337341

HTML (Hypertext Markup Language), 342346

login, 386389, 512, 628

microposts, 705

mockups (see mockups)

password reset, 642, 644

passwords, 344

signup, 315, 337346 (see also signup)

unfollow, 782

unsuccessful signups, 346361

viewing, 339

forwarding

friendly, 521526

URLs (uniform resource locators), 523, 524

frameworks

Bootstrap CSS (see Bootstrap CSS)

CSS (Cascading Style Sheets), 207 (see also CSS [Cascading Style Sheets])

friendly forwarding, 521526

full-table scans, 298

functionality, 123

functions, 123. See also methods

anonymous, 677

bcrypt, 305, 306, 455

gravatar_for helper function, 330, 331, 336

helpers (see helpers)

@import, 219

provide, 143

G

gem command, 12, 21

Gemfile directory, 1821

Gemfile versions, 22

Gemfiles, applying, 23

gems

adding, 218, 733, 740

bundler, 13

bundling without, 56

capybara, 21

Devise, 263

faker, 533

installing, 2425

updating, 110

versions, 22

will_paginate, 536, 538

generalizing authenticated? method, 585590

generate command, 665

generated code, 66

generated migrations, 448

generated static pages, 116124

generating

code, 118

controllers, 116, 118

Micropost models, 664, 665

sessions controllers, 383

tokens, 449

User mailer, 569574

User mailer previews, 575

User models, 267

GET request, 121, 122, 323, 383, 625

get rules, 246

getter methods, 202

Git

applying version control, 4142

configuration, 3641

first-time repository setup, 3941

first-time system setup, 3739

settings, 3641

toy demo application, 68 (see also toy demo application)

upgrading, 37

version control, 3536

git branch command, 49, 51, 52

git push command, 46

GitHub, 2, 446

branches, 4849

browser reload-page button, 47

navigating, 4247

passwords, 45

private repositories, 45

push templates, 44

README file, 4752

repositories, 46 (see also repositories)

globally recognized avatar, 328. See Gravatar (globally recognized avatar) images

Gómez, Jose Carlos Montero, 500

graphical user interfaces. See GUIs

Gravatar (globally recognized avatar) images, 330336, 505

customization, 333

profiles, 332

gravatar_for helper, 330, 331, 336, 530

grep utility, 611

guidelines

testing, 127, 128

titles, 161

GUIs (graphical user interfaces), 15, 29. See also interfaces

H

Hansson, David Heinemeier, 2, 65

has_many :through association, 767, 768

has_many relationships, 663, 670, 673, 756, 763

has_secure_password method, 303, 306308, 310, 312

hash mark (#), 166

hashed passwords, 303306

hashes, 185190

adding options, 530

nested, 188

header tag, 211, 212

headers, partials, 226, 228, 249

hello action, 80, 113

hello app, 3

hello_app directory, 1821

hello, world!, 3035

help action, 120

Help page

custom HTML (Hypertext Markup Language), 125

views, 124, 140, 144

helpers, 342

Application, 254

built-in, 160161

custom, 161165

files, 162

gravatar_for, 330, 331, 336, 530

image_tag, 214

log_in_as, 478479

pluralize text, 355, 356

render, 227, 228, 231

sessions, 399

testing, 164

titles, 176177

Heroku, 616, 658

commands, 5961

setup, 5459

SSL (Secure Sockets Layer), 374, 375

heroku command-line interface, 56

hexdigest method, 330

hidden fields, 642

hiding images, 226

hierarchies

classes, 193

inheritance, 98104, 196, 201

hijacking sessions, 374, 446

home action, 120, 709

Home pages

activation messages, 583

adding microposts, 699

adding statistics, 779

custom HTML (Hypertext Markup Language), 124

debug information, 320

delete links, 721

form errors, 706

HTML (Hypertext Markup Language), 136, 147

micropost forms, 705

Next links, 713

proto-feeds, 711

root routes, 150

status feeds, 710, 806, 816

titles, 139, 163, 164

views, 123, 143

hosts, domains, 580

Hotwire, 2, 348, 411, 755, 778

working follow buttons, 797802

hover attribute, 236, 237

HTML (Hypertext Markup Language), 115

About page, 148

account activation, 573

customization, 124

Home pages, 136, 147

login forms, 389

password reset, 635, 636

previews, 577

signup forms, 342346

stylesheets, 227

testing, 818

web pages, 136138

HTML5, 210, 218

HTTP (Hypertext Transfer Protocol), 121, 381, 382

operations, 122

verbs, 120

HTTP_REFERER, 719

Hypertext Markup Language. See HTML (Hypertext Markup Language)

Hypertext Transfer Protocol. See HTTP (Hypertext Transfer Protocol)

I

IAM (Identity and Access Management), 9, 744

id (identification), 212, 222

Identity and Access Management. See also IAM (Identity and Access Management)

IDEs (Integrated Development Environments), 5

provisioning, 11

IE (Microsoft Internet Explorer), 211

image_tag helper, 214

images

adding, 217, 728, 730

allowing valid formats, 736

downloading fixtures, 732

Gravatar, 330336

Gravatar (globally recognized avatar), 505

hiding, 226

importing, 736

microposts, 726752

processing, 740

resizing, 738742, 743

searching, 215

upload in production, 742752

uploading, 726733, 735

validation, 733738

implementation

active relationships, 764

callbacks, 303

Hotwire, 778

models, 87, 88

secure passwords, 309310

status feeds, 808811

user following, 761

implicit returns, 175

importing

images, 736

JavaScript, 415

inactive users, adding, 609

includes method, 814

incompatibilities, 24

indentation, configuring, 13

index action, 80, 84, 85, 527, 529

indices

adding, 762

databases, 297298

index pages user resource, 75

Micropost model migrations, 665

microposts, 91

multiple key indexes, 666

with pagination, 537

refactoring, 542

testing, 539542

user, 526532

users, 86

inheritance, 81, 123

classes, 193197, 271

hierarchies, 98104, 196, 201

initialization

hashes, 273

objects, 273

injection, SQL (Structured Query Language), 708

input tag, 783

inspect method, 188, 190, 289

installation, 5

confirmation, 13

gems, 2425

installation commands, 411, 412

Rails, 1114

instances

classes, 193

variables, 202

Integrated Development Environments. See IDEs (Integrated Development Environments)

integration

password reset tests, 652654

testing, 128, 207, 251, 505, 554, 724, 790

troubleshooting, 113

interfaces

Active Storage, 728

AWS (Amazon Web Services), 745

following tests, 803805

following users, 774805 (see also following users)

following/followers pages, 785794

Gravatar (globally recognized avatar) images, 505

GUIs (graphical user interfaces), 15, 29

heroku command-line, 56

microposts, 724

working follow buttons, 794802

internals links, 229

Internet, downloading images from, 217

interpolation, 167

invalid email addresses, 633

invalid images, uploading, 735

invalid information, submitting, 352

invalid input, login, 389

invalid login, 439

invalid submissions, 358361, 723

invalidity, 290. See also validity

irb configuration, 165

J

JavaScript, 2

adding, 210, 413

alerts, 737

code, 414, 422

customizing, 415

importing, 415

menu toggles, 410415, 422

preventing uploading of images, 736

refactoring code, 427

join method, 809, 819

K

key–value pairs, 812

keys, 185

API, 612, 616, 617

foreign, 764

multiple key indexes, 666

symbols as, 187

keywords

arguments, 336

do, 342

private, 565

return, 469

L

lambdas, 677

languages, Sass. See Sass language

large files, JavaScript alerts for, 737

layouts, 87

adding structure, 207232

applications (apps), 160

asset pipeline, 232235

Bootstrap CSS, 217226

custom CSS, 217226

debugging, 317318

files, 146

footers, 426

links, 242255

modifying links, 406410

navigating, 207

partials, 226232

Sass language, 235242

site navigation, 209217

static pages, 142149

testing changes, 427433

testing links, 251255

updating, 209

length

minimum standards for passwords, 308310

of posts, 9193

validations, 279, 286288

length method, 586

LICENSE file, 110

limitations of Ruby, 159165

line continuations, 564

links

adding, 209

adding delete, 716

adding URLs (Uniform Resource Locators), 530

Contact pages, 243245

footer partials with, 249

forgot password, 622

header partials with, 249

internals, 229

layouts, 242255

mailing account activation, 571

mapping routes/URLs, 243

microposts, 690

modifying layout, 406410

named routes, 248251

Next, 713

pagination, 715

Rails routes, 245248

signup pages, 214, 255260

testing, 251255

lists

contents, 41

ordered, 681

unordered, 213

literal constructors, 192

literal strings, 167. See also strings

local variables, 450

local web servers, allowing connections, 113

locks, 181185

log_in method, 399402, 434

log_in_as method, 478479, 516

log_out method, 438, 465

logged_in_user method, 510, 695, 696

logged_in? method, 407, 408

logged-in users, requiring, 509515, 528

logging out

if logged in, 468

testing, 466467

login, 381, 560

account activation, 559560 (see also account activation)

authentication, 389393

bugs, 465470

cloud IDEs (Integrated Development Environments), 416

current users, 402406

debugging, 390

failures, 386, 390, 394

flash messages, 393398

forgetting users, 462464

forgot password links, 627

forms, 386389, 512, 628

HTML (Hypertext Markup Language), 389

invalid, 439

invalid input, 389

log_in method, 399402

logging in, 398436

logging out, 437443

login with remembering, 453462

menu toggles, 410415

mobile styling, 415427

modifying layout links, 406410

with new navigation links, 411

preventing inactivated users, 593

redirecting, 524

refactoring tests, 597

remember digests, 446453

remember me behavior, 445470

remember me branches, 483489

remember me checkboxes, 470476

remember tokens, 446453

remember where I left off feature, 437

remembering users, 457

Safari developer tools, 417, 418, 419

safe navigation, 433

searching users, 389393

session tokens, 488

sessions, 381398

status, 435

test users, 512

testing, 436

testing layout changes, 427433

testing remember me, 476489

upon signup, 433436

user profile mockups, 407

validity, 389

logos

adding, 224

styles, 225

lorem ipsum text, 316

Lorem.sentence method, 685

ls command, 41

M

mail method, 571

mailers

adding, 560, 568

applications (apps), 570, 571

password reset, 634640

templates, 569574

manifest files, 233235, 412

map method, 183, 809

mapping

routes, 243

URLs (uniform resource locators), 79, 243

markup, adding, 421

matching patterns, 290

:member method, 776

menus

Account dropdown, 413

adding JavaScript, 413

clicking, 424

dropdown, 416

toggles, 410415, 422

merging README files, 5152

messages. See also email

activation, 583

error, 94, 284 (see also error messages)

flash, 365368, 393398

passing, 170173

sending, 586

warning, 593

meta tag, 147, 419

metaprogramming, 586

methods, 123, 776

adding session token methods to users, 488, 520

alert, 735

assert_difference, 553, 554

assert_match, 579, 793

assert_select, 252, 253

assert_template, 251

assigns, 601

attach, 729

authenticate, 304, 447

authenticated?, 456, 468, 469, 585590

belongs_to, 663, 765

built-in Rails, 160

chaining, 172

classes, 193, 428

cookies, 446

correct_user, 517, 518, 519

count, 683

create_activation_digest, 564

create_table, 268

create!, 534

created_at, 676

current_user, 402, 459, 460, 483, 484, 487

debug, 328

default_scope, 676

definitions, 174176

digest, 428, 429, 449

downcase, 331, 393

each, 182, 188, 288

empty?, 171, 355

feed, 706

follow, 796

following_ids, 810

forget, 463

getter, 202

has_secure_password, 303, 306308, 310, 312

hexdigest, 330

includes, 814

inspect, 188, 189, 289

join, 809, 819

length, 586

log_in, 399402, 434

log_in_as, 478479, 516

log_out, 438, 465

logged_in_user, 510, 695, 696

logged_in?, 407, 408

login status, 435

Lorem.sentence, 685

mail, 571

map, 183, 809

microposts, 672

paginate, 537

passing messages, 171

password reset, 631

password_reset, 569

password_reset_expired?, 648

patch, 504

PATCH, 493

permanent, 453, 455

pluralize, 700

push, 179

puts, 168

redirect_to, 362

references, 300, 564

referrer, 719

remember, 451, 458

respond_to, 799, 803, 804

root, 246

save, 273

send, 586

session, 400, 446, 477, 478

setter, 202

setup, 281, 307, 514, 595, 596, 597, 600, 601, 667, 668, 673

show_follow, 789

split, 177

store_location, 523

turbo_stream.update, 800, 802

unfollow, 796

upcase, 296

update, 278, 332

update_columns, 655656

user_params, 352, 647

User.digest, 560

user.forget, 462

User.new_token, 560

user.remember, 453

user/active relationship association, 765

utility, 770

valid?, 273, 284

validates, 283, 294

variant, 741

where, 706, 808, 812

Micropost resource, 87104. See also microposts

controllers, 89

inheritance hierarchies, 98104

length of posts, 9193

Restful routes, 89

User models, 9398

MicropostController class, 101

microposts, 65, 70, 663

access control, 694697

accessing, 96

adding, 683, 685, 699, 701, 721

associations, 95, 670674, 791

attributes, 664666

authorization, 694

controllers, 694

creating, 697705

CSS (Cascading Style Sheets), 687

default scope, 674678

deleting, 718

destroying, 716720

destroying users, 678679

error messages, 94, 702

failures, 710

feeds, 706

fixtures, 667, 675

forms, 705

generating, 664, 665

image upload in production, 742752

image validation, 733738

images, 726752 (see also images)

indexes, 91

interfaces, 724

length of posts, 9193 (see also mic)

methods, 672

Micropost models, 663679

modifying, 693726

navigating, 8791

ordering, 677

pagination links, 690

partials, 716

profile tests, 690693

profiles, 686, 688, 689

proto-feeds, 705716

refactoring, 673

refinements, 674679

rendering, 680685

resizing images, 738742

Restful routes, 694

samples, 685690

searching, 718

showing, 679693

testing, 667, 668, 690693, 720726

toy demo application, 71

uploading images, 726733

validations, 666670

:microposts symbol, 763

microposts table, 808

Microsoft Internet Explorer. See IE (Microsoft Internet Explorer)

migrations, 265, 546

account activation, 564

databases, 73, 265271, 727

email uniqueness, 298

files, 267

generated, 448

Micropost models, 665

password reset attributes, 628

passwords, 305

relationships tables, 762

running, 269

undoing, 119

User model, 268

MiniMagick, 740

minimum standards for passwords, 308310

mismatches, users, 723

missing files, 42

mixin facility (Sass language), 340

mkdir command, 14

mobile styling, login, 415427

mockups

creating microposts, 698

delete links, 717

forgot password forms, 623, 624

forgot password link, 622

login failures, 386

login forms, 383

profile pages with microposts, 680

profiles, 315, 316, 407 (see also profiles)

proto-feeds, 707

remember me checkboxes, 471

results of visiting protected pages, 510

signup, 338

stats partials, 776

status feeds, 806

uploading images, 727

user edit pages, 494

user followers pages, 787

user following pages, 786

user index pages, 527

users index with delete links, 545

model-view-controller. See MVC (model-view-controller)

modeling users, 263364

adding secure passwords, 303313

authentication, 310313

creating user objects, 272275

database migrations, 265271

finding user objects, 276277

format validations, 288294

length validations, 286288

model files, 271272

presence validations, 282285

uniqueness validations, 294303

updating user objects, 277279

user models, 264279

user validations, 279303

models, 29, 82

authorization, 381

data, 7071 (see also data models)

implementing, 87, 88

inheritance, 98 (see also inheritance)

Microposts, 663679 (see also microposts)

relationship, 84, 756773 (see also relationship models)

security, 513

troubleshooting, 757763

User, 84, 85

modifying

built-in classes, 197199

colors, 225

layout links, 406410

microposts, 693726

root routes, 36

modules, 399

Moor, Andrew, 518

moving comments, 167

multiple key indexes, 666

mutating arrays, 179

MVC (model-view-controller), 2830

architecture, 32

in Rails, 82

toy demo application, 7786

N

name attribute, 344, 345, 349

named routes, 212, 248251

names

conventions, 267

environments, 9

nano text editors, 165

native system configuration, 6

navigating

Add user pages, 746

consoles, 165, 166

GitHub, 4247

layouts, 207

microposts, 8791

safe navigation, 433

site navigation, 209217

navigators

cloud IDEs (Integrated Development Environments), 7

filesystems, 7

Find in Files global search, 7

nested hashes, 188

nesting

checkboxes, 470

Sass language, 235238

new action, 338, 382, 383, 493, 623

new hotness problems, 2

new password resets, 627630. See also password reset

new_token method, 572

Next links, 713

nil (empty) passwords, 357

notation

>, 21, 22

>=, 21

numbers

Gemfile versions, 22

versions, 12, 13

O

object-oriented programming. See OOP (object-oriented programming)

objects, 29

communicating with databases, 99

creating user, 272275

initializing, 273

strings, 170173

user (see user objects)

OOP (object-oriented programming), 98

opening

applications (apps), 30

terminal tabs, 27

operators

==, 254

or equals (||=) assignment, 404

ternary, 428, 474, 475

options hashes, adding, 335, 530

or equals (||=) assignment operator, 404

ordered lists, 681

ordering

ascending order, 676

defaults, 663

microposts, 677

testing, 675

output

debug, 319, 320

paginating user, 526, 535539

P

paginate method, 537

pagination

links, 715

microposts, 690

user output, 526, 535539

palindromes, 176, 197

panes, splitting, 280

parameters

cost, 428

queries, 572

strong, 547

unsuccessful signups, 350353

params hash, 349, 351

partials, 226232

footers, 228, 249

headers, 228, 249

microposts, 716

refactoring, 542544

passing messages, 170173

passive relationships, 759, 760

password reset, 560, 621623

attributes, 628

controllers, 624627

create action, 630633

digests, 657

edit action, 641644

email in production, 658659

email tests, 640641

emails, 634641

failures, 649

forms, 642, 644

HTML (Hypertext Markup Language), 635, 636

invalid email addresses, 633

links, 626

mailers, 634640

methods, 631

new password resets, 627630

plain-text email templates, 635

previewing, 635636, 637

requests, 627

resetting passwords, 641657

resources, 623633

submitting, 638

templates, 634640

testing, 651657

updating, 645651, 704

views, 629

password_digest attribute, 539

password_reset method, 569

password_reset_expired? method, 648

passwords

adding, 306, 307

adding secure, 303313

authentication, 310313

bcrypt, 455

confirmation, 303, 332

digests, 456

empty (nil), 357

encryption, 304

fixtures, 428

GitHub, 45

hashed, 303306

migrations, 305

minimum standards for, 308310

remember tokens, 449

reset (see password reset)

saving, 39

signup forms, 344

testing, 308

updating, 507

user has secure, 306308

pasting comments, 167

PATCH, 121, 122

patch method, 504

PATCH method, 493, 561, 625

patterns, matching, 290

permanent method, 453, 455

persistence, 265, 396, 397

persistent sessions

logging out, 464

testing, 485

Philips, Andy, 304

pipeline, asset, 232235

placeholders, views as, 124

plain-text email templates, 635

planning toy demo applications, 6670

pluralize method, 700

pluralize text helper, 355, 356

POST request, 121, 122, 346, 359, 383, 493, 625

PostgreSQL, 110, 265, 377

posts, deleting, 722

pound sign (#), 166

prefills, edit pages, 497

preprocessor engines, 234

presence validations, 99, 279, 282285

previewing

applications (apps), 26

email, 574577

HTML (Hypertext Markup Language), 577

password reset, 635636, 637

primary keys, 73

printing strings, 168169

private keyword, 565

private repositories, 45

Proc (procedure), 677

processing images, 740

production, 166

AWS (Amazon Web Services), 748752

database configuration, 377378

deployment, 378379

efficiency in, 234

email in, 610618, 658659

images upload in, 742752

web servers, 376377

professional-grade deployment, 374379

production database configuration, 377378

production deployment, 378379

production web servers, 376377

SSL (Secure Sockets Layer), 374376

profiles, 316. See also signup

account activation, 592

adding statistics, 783

follow buttons, 784

Gravatar (globally recognized avatar) images, 332

microposts, 686, 688, 689

mockups, 407

sidebars, 700

unfollow buttons, 785

users, 756

viewing, 420

programmatic access, 746

protected pages, accessing, 512

proto-feeds, 705716, 717

protocols

HTTP (Hypertext Transfer Protocol), 120, 121, 122, 381, 382

stateless, 381

provide function, 143

provisioning IDEs (Integrated Development Environments), 11

Puma, 376377

push method, 179

push sequences, 117

push templates, 44

push, README files, 52

pushing applications (apps), 114

puts method, 168

Q

queries

parameters, 572

problems, 814

R

Rails

activating Turbo, 800

consoles, 95, 165

controllers, 29

debugger prompt in, 328

deploying, 5261

directory structures, 18

environments, 316322

hello, world!, 3035

Heroku setup, 5459

installing, 1114

MVC (model-view-controller), 2830, 82

routers, 33, 79, 82

routes, 245248

running servers, 2527, 28

shortcuts, 117

toy demo application, 6566 (see also toy demo application)

rails command, 13, 17, 129

rails new command, 14, 16, 66, 136

rails server command, 2527

rails test, running, 164

Rails-flavored Ruby, 159

built-in helpers, 160161

CSS (Cascading Style Sheets), 190191

custom helpers, 161165

data structures, 177191

limitations of Ruby, 159165

method definitions, 174176

Ruby classes, 192204

strings, 165174 (see also strings)

title helpers, 176177

ranges, 177181

raw home view, 121

rdbg (Ruby debugger), 328

README file, 110, 111

defaults, 48

editing, 4951

GitHub, 4752

merging, 5152

push, 52

record, Active Record, 98, 265, 273, 274, 276277, 560. See also Active Record

Red, Green, Refactor cycle, 130135, 136

redirect_to method, 362

redirecting

browsers, 361

index action, 527

login, 524

redundancy, data models and, 758

refactoring, 107

account activation, 594610

activation code, 604610

embedded Ruby, 142149

JavaScript, 427

microposts, 673

partial, 542544

Red, Green, Refactor cycle, 130135

testing logout, 441

references, methods, 564

referrer method, 719

refreshing errors, 715

regex validations, 291

regions, AWS (Amazon Web Services), 749

regressions, 127

regular expressions, 290

Rublar regular expression editor, 292

Relationship controller, 796

relationship models, 84, 756773

adding indices, 762

data model problems, 757763

defining, 760

followed users, 767771

followers, 771773

testing, 766

user/relationship associations, 763766

validations, 766767

relationships

access control tests, 795

active, 759, 760, 761

adding following/follower, 774

belongs_to, 670, 672

destroying, 759, 783, 801

following/follower tests, 792

formatting, 759

has_many, 663, 670, 673, 756, 763, 764

passive, 759, 760

routes, 782

Turbo templates, 801

working follow buttons, 794802

relationships tables, 762

remember me, 560

behavior, 445470

branches, 483489

bugs, 465470

checkboxes, 445, 470476

digests, 446453

forgetting users, 462464

login with remembering, 453462

testing, 476489

tokens, 446453

remember method, 451, 458

remember where I left off feature, 437

remember_digest attribute, 447, 448

remote origin, 43

render helper, 227, 228, 231

rendering

microposts, 680685

README files, 48

user signup errors, 702

repositories

adding, 46

creating, 43, 112

first-time repository setup, 3941

private, 45

toy demo application, 68 (see also toy demo application)

viewing, 47

representational state transfers. See REST

requests

DELETE, 382, 383, 408, 549

GET, 121, 122, 323, 383, 625

password resets, 622, 627 (see also password reset)

PATCH, 493, 561, 625

POST, 121, 122, 346, 359, 383, 493, 625

protocols, 381 (see also protocols)

requiring

logged-in users, 509515, 528

the right user, 515521

reset

databases, 568

passwords (see password reset)

resizing images, 738742, 743

resources

account activation, 560568

adding, 327, 384, 625

Micropost resource (see Micropost resource)

microposts (see microposts)

password reset, 623633

REST (REpresentational State Transfer), 759

RESTful, 382

Users, 322327 (see Users resource)

respond_to method, 799, 803, 804

REST (REpresentational State Transfer), 65, 83, 115, 122, 315, 322

resources, 759

RESTful resources, 382

RESTful routes, 84, 89, 324

Account Activation resource, 561

custom rules in resources, 777

microposts, 694

password resets, 625

resubmitting. See also forms; submitting unsuccessful signups, 347

return keyword, 469

returns, implicit, 175

root method, 246

root routes

configuration, 114, 149152

modifying, 36

root routes for users, adding, 81

root URLs, 33

routers, Rails, 33, 79, 82

routes

adding, 562

adding Users resources, 324

mapping, 243

named, 212, 248251

Rails, 245248

relationships, 782

RESTful, 84, 89, 324

root (see root routes)

session rules, 384

signup, 258

static pages, 247

routes files, updating, 119

routing, 324, 325

errors, 714

files, 33

modifying root routes, 36

Rublar regular expression editor, 292

Ruby

classes, 81, 192204 (see also classes)

comments, 166

limitations of, 159165

Ruby debugger (rdbg), 328

Ruby Version Manager. See rvm (Ruby Version Manager)

RubyGems package manager, 12

rules

CSS (Cascading Style Sheets), 208, 222

debug output, 319, 320

get, 246

sessions, 384

users resource, 7980

running

migrations, 269

rails new command, 16

rails server command, 2527

rails test, 164

servers, 2527, 28

rvm (Ruby Version Manager), 10

S

S3 (Simple Storage Service), 743, 750

Safari developer tools, 417, 418, 419

safe navigation, 433

samples

app, 5, 208

following data, 774775

microposts, 685690

users, 533534

sandboxes, 272

Sass language, 218, 235242

mixin facility, 340

nesting, 235238

variables, 238242

save method, 273

saving

before_save callback, 564, 565

passwords, 39

scaffold generators, 65, 72

scaffolding, 65, 66, 81

scalability, 2

scope, defaults, 674678

scripts, generating, 72

SCSS, 235, 237, 240, 334, 335

sidebars, 779

searching

Find in Files global search, 7

images, 215

microposts, 718

user objects, 276277

users, 389393

users to follow, 757

secure passwords, adding, 303313

security

models, 513

sessions, 446, 447

seed users, activating, 566

seeding databases, 533, 534

selecting Ubuntu Servers, 10, 14

send method, 586

SendGrid, 611, 613, 614, 615, 616, 617

sending

email, 604

messages, 586

servers, 121

allowing connections, 113

production web, 376377

running, 2527, 28

sharing, 29

Ubuntu (see Ubuntu Servers)

session method, 400, 446, 477, 478

sessions

adding token methods on users, 488, 520

authentication, 382

controllers, 382386

cookies, 398

create action, 391

destroying, 438

fixations, 400, 518

helpers, 399

hijacking, 374, 446

logging out from persistent, 464

login, 381398

replay attacks, 400

security, 446, 447

simulating, 406

testing, 485

tokens, 488

setter methods, 202

settings. See also configuration

Git, 3641

indentation, 13

setup. See also configuration

applications (apps), 107115

first-time repository, 3941

first-time system, 3739

setup method, 281, 307, 514, 595, 596, 597, 600, 601, 667, 668, 673

sharing servers, 29

shim stylesheets, 227

short-circuit evaluation, 405

shortcuts, Rails, 117

show action, 83, 326

show_follow method, 789

showing

all users, 526544

data, 777

debug environments, 316322

debugging, 328330

Gravatar images, 330336

index tests, 539542

microposts, 679693

paginating user output, 535539

partial refactoring, 542544

Rails environments, 316322

sample users, 533534

sidebars, 330336

user indices, 526532

users, 316336 (see also users)

users following, 790, 791, 792

Users resources, 322327

side effects, 168

sidebars, 330336

adding, 333334

CSS (Cascading Style Sheets), 334

SCSS, 779

styles, 335

templates, 725

user info, 700

signing cryptography, 446

signup, 214, 255260

account activation, 581 (see also account activation)

activation messages at, 583

AWS (Amazon Web Services), 745

debug environments, 316322

debugging, 328330, 349

finished signup forms, 362364

first signups, 368369

flash messages, 365368

form_with, 337341

forms, 337346

Gravatar images, 330336

HTML (Hypertext Markup Language), 342346

login upon, 433436

mockups, 264, 338

passwords, 344

production database configuration, 377378

production deployment, 378379

production web servers, 376377

professional-grade deployment, 374379

Rails environments, 316322

rendering user errors, 702

SendGrid, 613

showing users, 316336

sidebars, 330336

SSL (Secure Sockets Layer), 374376

successful, 361373

testing for valid submission, 369373

unsuccessful signups, 346361

URLs (uniform resource locators), 257260

Users resources, 322327

views, 500

signups

error messages, 353358

strong parameters, 350353

testing for invalid submissions, 358361

Simple Storage Service. See S3 (Simple Storage Service)

simulating sessions, 406

single-quoted strings, 169170

site layouts, applications (apps), 146

site navigation, 209217

sizing

cloud IDEs (Integrated Development Environments), 14

displaying, 739

slightly dynamic pages, 135142

spacing, adding, 221

split method, 177

splitting panes, 280

Sprockets utility, 219, 233

SQL (Structured Query Language), 96, 265

commands, 274

injection, 708

SQLite, 110, 265, 311

SSL (Secure Sockets Layer), 374376

stabby lambdas, 677

staging areas, 40

starting

applications (apps), 1435

GitHub, 4247

hello, world!, 3035

testing, 128130

stateless protocols, 381

statements, &&, 405

static pages, 115126

adding titles, 138142

classes, 199

configuring root routes, 149152

controllers, 122

customization, 124126

embedded Ruby, 142149

formatting, 115

generated static pages, 116124

layouts, 142149

Red, Green, Refactor cycle, 130135

routes, 247

sample app setups, 107115

slightly dynamic pages, 135142

testing titles, 136138

tests, 126135

updating, 160

statistics

adding, 779, 783

following users, 775785

viewing, 777

status feeds, 693, 707, 709, 710, 805821

eager loading, 812821

Home pages, 816

implementation, 808811

strategies, 806808

subselects, 812821

testing, 807

testing duplicate feed items, 819

testing HTML, 818

status, login, 435

Stimulus, 411

storage

Active Storage, 749 (see also Active Storage)

adding Amazon AWS, 749

URLs (uniform resource locators) forwarding, 523

store_location method, 523

strategies, status feeds, 806808

strings

keys, 185

literals, 167

matching patterns, 290

objects, 170173

printing, 168169

Rails-flavored Ruby, 165174

single-quoted, 169170

strong parameters, 547

unsuccessful signups, 350353

Structured Query Language. See SQL (Structured Query Language)

structures

adding to layouts, 207232

Bootstrap CSS, 217226

custom CSS, 217226

directories, 17, 18

partials, 226232

site navigation, 209217

styles, 87

adding, 209, 221, 223

footers, 426

login mobile styling, 415427

logos, 225

sidebars, 335

stylesheets

HTML (Hypertext Markup Language), 227

partials, 226

subdirectories, 29. See also directories

valid submissions, 723

submitting

invalid information, 352

invalid submissions, 723

microposts with images, 731

password resets, 638

remember me checkboxes, 474

testing for invalid submissions, 358361

testing for valid submission, 369373

unsuccessful signups, 346361

subselects, 812821

successful edits (with TDD), 505509

successful signup

first signups, 368369

flash messages, 365368

testing for valid submission, 369373

successful signups, 361373

symbol-to-proc, 183

synonyms, 178

colors, 225

syntax, nesting, 236

T

tables, 266. See also databases

DB Browser, 270

followers, 758

microposts, 808

relationships, 762

users, 266

tabs, opening, 27

tags

body, 145

div, 211, 212, 213

form, 345

header, 211, 212

input, 783

meta, 147, 419

<title>, 135

users, 747

TDD (test-driven development), 2, 127, 207

split panes, 280

successful edits with, 505509

Tech Support Cheat Sheet, 6

technical sophistication, 6, 18, 84, 307, 321

templates

code, 607

ERb (embedded Ruby), 680

errors, 363

instance variables, 482

mailers, 569574

password reset, 634640

push, 44

remember me tests, 483

sidebars, 725

testing, 251, 373, 608, 610

testing image uploads, 732

tests of error messages, 361

Turbo, 801

update_columns method, 655656

temporary cookies, 400

terminal tabs, opening, 27

terminals, command-line, 7

ternary operators, 428, 474, 475

test suites, 126

test-driven development. See TDD

TestCase class, 477

testing, 87, 166

About page, 131

acceptance tests, 505, 506

access control tests, 795

account activation, 594610

admin attribute, 548

authorization, 786

automated, 126

automated testing, 107

breaking up long, 595600

broken-up activation tests, 600603

case sensitivity, 296

Contact pages, 243, 244

controllers, 128, 129

duplicate email addresses, 294

duplicate feed items, 819

editing for wrong users, 516

email, 577581

email formats, 289

flash, 394398

following tests, 803805

following/follower pages, 793

friendly forwarding, 522

guidelines, 127, 128

helpers, 164

HTML (Hypertext Markup Language), 818

index action, 527

indices, 539542

integration, 128, 207, 251, 505, 554, 724, 790

invalid login, 439

for invalid submissions, 358361

layout changes, 427433

links, 251255

logging out, 466467

login, 436

login status, 435

microposts, 667, 668, 690693, 720726

ordering, 675

palindromes, 176

password reset, 651657

passwords, 308

persistent sessions, 485

refactoring activation code, 604610

relationship models, 766

remember me, 476489

remember me branches, 483489

security models, 513

starting, 128130

static pages, 126135

status feeds, 807

templates, 373, 608, 610

titles, 136138

unsuccessful edits, 503504

user destroy tests, 552555

user logout, 439

User model, 281

for valid submission, 369373

valid user email, 432

validity, 280282, 430

text

editors, 7, 19

Micropost models, 664 (see also microposts)

nano, 165

timestamps, account activation, 591

titles

base, 161

defining, 162

helpers, 176177

Home pages, 139, 163, 164

testing, 136138

toggles, menus, 410415, 422

tokens

accessing activation, 563

adding session token methods to users, 488, 520

callbacks, 564566

defining, 452, 453

generating, 449

password resets, 622 (see also password reset)

remember me, 446453

sessions, 488

tools

command-line, 15 (see also command-line)

development, 8

indexes, 298

Safari developer, 417, 418, 419

touch trick, 219

toy app, 4

toy demo application, 6566

data models, 7071

deploying, 102104

Micropost resource, 87104 (see also microposts)

microposts, 70, 71

MVC (model-view-controller), 7786

planning, 6670

repositories, 68

User model for, 85

user tours, 7376

Users resource, 7173

weaknesses of User resource, 8687

tracking remember me behavior, 445470

transactions, 381. See also protocols

transfers, representational state, 83

troubleshooting

data models, 757763

integration, 113

unfollow buttons, 759

Turbo, 2, 348, 411

activating, 800

streams, 798, 799

templates, 801

turbo_stream.update method, 800, 802

U

Ubuntu Servers, 8

selecting, 10, 14

uncommenting, 515

undoing

code generation, 118

migrating, 119

unfollow buttons, 759

unfollow method, 796

uniqueness validations, 279, 294303

Active Record, 297

Unix command lines, 2

unordered lists, 213

unsuccessful edits

testing, 503504

updating users, 501503

unsuccessful signups, 346361. See also signup

debugging, 349

error messages, 353358

strong parameters, 350353

testing for invalid submissions, 358361

upcase method, 296

update action, 83, 501, 507, 561, 646

update method, 278, 332

update_columns method, 655656

updating, 493494

authenticated? method, 469

create action, 581585

edit forms, 494501

edit pages prefills, 497

empty passwords, 507

errors, 703

footers, 425

gems, 110

layouts, 209

password reset, 645651, 704

passwords, 506

routes files, 119

session controllers, 384

static pages, 160

successful edits (with TDD), 505509

testing unsuccessful edits, 503504

unsuccessful edits, 501503

user objects, 277279

Users controllers, 258

upgrading Git, 36

upload fields, adding images to, 729

uploading images, 726733, 735

URLs (uniform resource locators)

adding, 530

adding users, 74, 498

forwarding, 523, 524

mapping, 79, 243

root, 33

routing, 325

signup pages, 257260

Users resource and, 73

user administrative access, 747

User class, 202204

User mailer

generating, 569574

previews, 575

User model, 84, 85, 267

account activation, 566

adding activation methods, 604

adding password reset methods, 648

authenticated? method, 456

following association, 768

forget method, 463

Micropost resource, 9398

migrating, 268

password reset attributes, 628

password reset methods, 631

presence validations, 99

remember_digest attribute, 447

testing, 281

validations, 502

user objects

creating, 272275

searching, 276277

updating, 277279

User resource, weaknesses of, 8687

user tours, toy demo application, 7376

user_params method, 352, 647

User.digest method, 560

user.forget method, 462

User.new_token method, 560

user.remember method, 453

users

account activation, 559560 (see also account activation)

activating fixtures, 567

activating seed, 566

adding, 74, 214, 516, 540

adding root routes for, 81

adding session token methods to, 488, 520

administrative, 544548

associations, 95, 670674

authentication, 303

authorization, 509526 (see also authorization)

current, 402406

deleting, 544555 (see also deleting users)

deploying, 81

destroying, 678679

edit pages, 78

editing, 703

finding to follow, 757

fixtures, 428

following, 755756, 790, 791, 792 (see also following users)

formatting, 746

inactive, 610

index page, 80

index tests, 539542

indexes, 86

indices, 526532

info sidebars, 700

login, 381, 401 (see also login)

microposts (see microposts)

mismatches, 723

modeling (see modeling users)

paginating user output, 526, 535539

partial refactoring, 542544

profiles, 316, 756 (see also profiles)

remembering, 457 (see also remember me)

requiring logged-in, 528

requiring the right user, 515521

routes, 782

sample, 533534

searching, 389393

searching microposts, 718

showing all, 526544

signup pages, 255260, 264 (see also signup)

tags, 747

updating, 493494 (see also updating users)

viewing, 322, 326

Users controllers, 8283, 255257

debuggers, 328, 329

show action, 326

Users resource, 322327

adding, 327

index pages, 75

RESTful routes, 84

rules, 7980

toy demo application, 7173

URLs (uniform resource locators) and, 73

users tables, 266

UsersController class, 100

UsersLoginTest, 600

utilities. See also tools

convert command-line, 739, 740

curl, 215

grep, 611

Sprockets, 219, 233

utility methods, 770

V

valid image formats, allowing, 736

valid submissions, 723

valid user email, testing, 432

valid? method, 273, 284

validates method, 283, 294

validation

Active Storage, 733

adding to images, 734

data, 86

format, 279, 288294

images, 733738

length, 279, 286288

microposts, 666670

presence, 99, 279, 282285

regex, 291

relationship models, 766767

uniqueness, 279, 294303

User model, 502

user validations, 279303

validity tests, 280282

validity, 273

login, 389

microposts, 667

testing, 280282, 430

ValidLogin class, 597

values, 188

defaults, 193, 203

variables

adding feed instance, 709

defining, 238

local, 450

Sass language, 238242

@session, 387

@user, 338, 387, 388

variant method, 741

verbs, HTTP (Hypertext Transfer Protocol), 120

versions

applying version control, 4142

control, 3536, 265

gems, 22

installing Rails, 12

numbers, 12, 13

viewing

applications (apps), 30

error messages, 353

forms, 339

hello, world!, 34

repositories, 47

showing all users, 526544

statistics, 777

user information, 326

users, 322

viewports, 419

views, 29, 82, 115

About page, 140, 145

account activation, 573

adding sidebars, 333334

Contact pages, 245

ERb (embedded Ruby), 142, 143

Help page, 124, 140, 144

Home pages, 123, 143

password reset, 629

raw home, 121

signup, 500

user edit, 496

user profiles, 420

users index, 529

violations, 279

W

warning messages, 593

web applications, 1. See also applications

strings, 167174 (see also strings)

web development, 1

web interfaces

following tests, 803805

following users, 774805 (see also following

users)

following/followers pages, 785794

sample following data, 774775

statistics, 775785

working follow buttons, 794802

web pages, HTML (Hypertext Markup Language), 136138

web servers

allowing connections, 113

production, 376377

WebSockets, 798

where method, 706, 808, 812

which command, 739

will_paginate gem, 536, 538

wireframes, 208

working follow buttons, 794802

X

XSS (cross-site scripting), 147, 446

Y

YAML (YAML Ain’t Markup Language), 321

Z

zero-offset, 178

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.65.61