Contents
Chapter 1 From zero to deploy
1.1 Introduction
1.1.1 Comments for various readers1.1.2 “Scaling” Rails
1.1.3 Conventions in this book
1.2 Up and running
1.2.1 Development environments1.2.2 Ruby, RubyGems, Rails, and Git
1.2.3 The first application
1.2.4 Bundler
1.2.5 rails server
1.2.6 Model-view-controller (MVC)
1.3 Version control with Git
1.3.1 Installation and setup1.3.2 Adding and committing
1.3.3 What good does Git do you?
1.3.4 GitHub
1.3.5 Branch, edit, commit, merge
1.4 Deploying
1.4.1 Heroku setup1.4.2 Heroku deployment, step one
1.4.3 Heroku deployment, step two
1.4.4 Heroku commands
Chapter 2 A demo app
2.1 Planning the application
2.1.1 Modeling demo users
2.1.2 Modeling demo microposts
2.2 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 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 demo app
2.4 Conclusion
Chapter 3 Mostly static pages
3.1 Static pages
3.2 Our first tests
3.2.1 Test-driven development
3.2.2 Adding a page
3.3 Slightly dynamic pages
3.3.1 Testing a title change
3.3.2 Passing title tests
3.3.3 Embedded Ruby
3.3.4 Eliminating duplication with layouts
3.4 Conclusion
3.5 Exercises
3.6 Advanced setup
3.6.1 Eliminating bundle exec
3.6.2 Automated tests with Guard
3.6.3 Speeding up tests with Spork
3.6.4 Tests inside Sublime Text
Chapter 4 Rails-flavored Ruby
4.1 Motivation
4.2 Strings and methods
4.2.1 Comments
4.2.2 Strings
4.2.3 Objects and message passing
4.2.4 Method definitions
4.2.5 Back to the title helper
4.3 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 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 Conclusion
4.6 Exercises
Chapter 5 Filling in the layout
5.1 Adding some structure
5.1.1 Site navigation
5.1.2 Bootstrap and custom CSS
5.1.3 Partials
5.2 Sass and the asset pipeline
5.2.1 The asset pipeline
5.2.2 Syntactically awesome stylesheets
5.3 Layout links
5.3.1 Route tests
5.3.2 Rails routes
5.3.3 Named routes
5.3.4 Pretty RSpec
5.4 User signup: A first step
5.4.1 Users controller
5.4.2 Signup URL
5.5 Conclusion
5.6 Exercises
Chapter 6 Modeling users
6.1 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 User validations
6.2.1 Initial user tests
6.2.2 Validating presence
6.2.3 Length validation
6.2.4 Format validation
6.2.5 Uniqueness validation
6.3 Adding a secure password
6.3.1 A hashed password
6.3.2 Password and confirmation
6.3.3 User authentication
6.3.4 User has secure password
6.3.5 Creating a user
6.4 Conclusion
6.5 Exercises
Chapter 7 Sign up
7.1 Showing users
7.1.1 Debug and Rails environments
7.1.2 A Users resource
7.1.3 Testing the user show page (with factories)
7.1.4 A Gravatar image and a sidebar
7.2 Signup form
7.2.1 Tests for user signup
7.2.2 Using form_for
7.2.3 The form HTML
7.3 Signup failure
7.3.1 A working form
7.3.2 Strong parameters
7.3.3 Signup error messages
7.4 Signup success
7.4.1 The finished signup form
7.4.2 The flash
7.4.3 The first signup
7.4.4 Deploying to production with SSL
7.5 Conclusion
7.6 Exercises
Chapter 8 Sign in, sign out
8.1 Sessions and signin failure
8.1.1 Sessions controller
8.1.2 Signin tests
8.1.3 Signin form
8.1.4 Reviewing form submission
8.1.5 Rendering with a flash message
8.2 Signin success
8.2.1 Remember me
8.2.2 A working sign_in method
8.2.3 Current user
8.2.4 Changing the layout links
8.2.5 Signin upon signup
8.2.6 Signing out
8.3 Introduction to cucumber (optional)
8.3.1 Installation and setup
8.3.2 Features and steps
8.3.3 Counterpoint: RSpec custom matchers
8.4 Conclusion
8.5 Exercises
Chapter 9 Updating, showing, and deleting users
9.1 Updating users
9.1.1 Edit form
9.1.2 Unsuccessful edits
9.1.3 Successful edits
9.2 Authorization
9.2.1 Requiring signed-in users
9.2.2 Requiring the right user
9.2.3 Friendly forwarding
9.3 Showing all users
9.3.1 User index
9.3.2 Sample users
9.3.3 Pagination
9.3.4 Partial refactoring
9.4 Deleting users
9.4.1 Administrative users
9.4.2 The destroy action
9.5 Conclusion
9.6 Exercises
Chapter 10 User microposts
10.1 A Micropost model
10.1.1 The basic model
10.1.2 The first validation
10.1.3 User/Micropost associations
10.1.4 Micropost refinements
10.1.5 Content validations
10.2 Showing microposts
10.2.1 Augmenting the user show page
10.2.2 Sample microposts
10.3 Manipulating microposts
10.3.1 Access control
10.3.2 Creating microposts
10.3.3 A proto-feed
10.3.4 Destroying microposts
10.4 Conclusion
10.5 Exercises
Chapter 11 Following users
11.1 The Relationship model
11.1.1 A problem with the data model (and a solution)
11.1.2 User/relationship associations
11.1.3 Validations
11.1.4 Followed users
11.1.5 Followers
11.2 A web interface for following users
11.2.1 Sample following data
11.2.2 Stats and a follow form
11.2.3 Following and followers pages
11.2.4 A working follow button the standard way
11.2.5 A working follow button with Ajax
11.3 The status feed
11.3.1 Motivation and strategy
11.3.2 A first feed implementation
11.3.3 Subselects
11.3.4 The new status feed
11.4 Conclusion
11.4.1 Extensions to the sample application
11.4.2 Guide to further resources
11.5 Exercises
No comments:
Post a Comment