O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Agile Web Development with Rails 5, 1st Edition

Book Description

Rails 5 and Ruby 2.2 bring many improvements, including new APIs and substantial performance enhancements, and the fifth edition of this award-winning classic is now updated! If you're new to Rails, you'll get step-by-step guidance. If you're an experienced developer, this book will give you the comprehensive, insider information you need for the latest version of Ruby on Rails.

Table of Contents

  1.  Foreword to the Rails 5 Edition
  2.  Preface to the Rails 5 Edition
  3.  Acknowledgments
  4.  Introduction
    1. Rails Simply Feels Right
    2. Rails Is Agile
    3. Who This Book Is For
    4. How to Read This Book
  5. Part I. Getting Started
    1. 1. Installing Rails
      1. Installing on Cloud9
      2. Installing on a Virtual Machine
      3. Installing on Windows
      4. Installing on Mac OS X
      5. Installing on Linux
      6. Choosing a Rails Version
      7. Setting Up Your Development Environment
      8. Rails and Databases
    2. 2. Instant Gratification
      1. Creating a New Application
      2. Hello, Rails!
      3. Linking Pages Together
      4. When Things Go Wrong
    3. 3. The Architecture of Rails Applications
      1. Models, Views, and Controllers
      2. Rails Model Support
      3. Action Pack: The View and Controller
    4. 4. Introduction to Ruby
      1. Ruby Is an Object-Oriented Language
      2. Data Types
      3. Logic
      4. Organizing Structures
      5. Marshaling Objects
      6. Pulling It All Together
      7. Ruby Idioms
  6. Part II. Building an Application
    1. 5. The Depot Application
      1. Incremental Development
      2. What Depot Does
      3. Let’s Code
    2. 6. Task A: Creating the Application
      1. Iteration A1: Creating the Product Maintenance Application
      2. Iteration A2: Making Prettier Listings
    3. 7. Task B: Validation and Unit Testing
      1. Iteration B1: Validating!
      2. Iteration B2: Unit Testing of Models
    4. 8. Task C: Catalog Display
      1. Iteration C1: Creating the Catalog Listing
      2. Iteration C2: Adding a Page Layout
      3. Iteration C3: Using a Helper to Format the Price
      4. Iteration C4: Functional Testing of Controllers
      5. Iteration C5: Caching of Partial Results
    5. 9. Task D: Cart Creation
      1. Iteration D1: Finding a Cart
      2. Iteration D2: Connecting Products to Carts
      3. Iteration D3: Adding a Button
    6. 10. Task E: A Smarter Cart
      1. Iteration E1: Creating a Smarter Cart
      2. Iteration E2: Handling Errors
      3. Iteration E3: Finishing the Cart
    7. 11. Task F: Add a Dash of Ajax
      1. Iteration F1: Moving the Cart
      2. Iteration F2: Creating an Ajax-Based Cart
      3. Iteration F3: Highlighting Changes
      4. Iteration F4: Hiding an Empty Cart
      5. Iteration F5: Broadcasting Updates with Action Cable
    8. 12. Task G: Check Out!
      1. Iteration G1: Capturing an Order
      2. Iteration G2: Atom Feeds
    9. 13. Task H: Sending Mail
      1. Iteration H1: Sending Confirmation Emails
      2. Iteration H2: Integration Testing of Applications
    10. 14. Task I: Logging In
      1. Iteration I1: Adding Users
      2. Iteration I2: Authenticating Users
      3. Iteration I3: Limiting Access
      4. Iteration I4: Adding a Sidebar, More Administration
    11. 15. Task J: Internationalization
      1. Iteration J1: Selecting the Locale
      2. Iteration J2: Translating the Storefront
      3. Iteration J3: Translating Checkout
      4. Iteration J4: Add a Locale Switcher
    12. 16. Task K: Deployment and Production
      1. Iteration K1: Deploying with Phusion Passenger and MySQL
      2. Iteration K2: Deploying Remotely with Capistrano
      3. Iteration K3: Checking Up on a Deployed Application
    13. 17. Depot Retrospective
      1. Rails Concepts
      2. Documenting What We’ve Done
  7. Part III. Rails in Depth
    1. 18. Finding Your Way Around Rails
      1. Where Things Go
      2. Naming Conventions
    2. 19. Active Record
      1. Defining Your Data
      2. Locating and Traversing Records
      3. Creating, Reading, Updating, and Deleting (CRUD)
      4. Participating in the Monitoring Process
      5. Transactions
    3. 20. Action Dispatch and Action Controller
      1. Dispatching Requests to Controllers
      2. Processing of Requests
      3. Objects and Operations That Span Requests
    4. 21. Action View
      1. Using Templates
      2. Generating Forms
      3. Processing Forms
      4. Uploading Files to Rails Applications
      5. Using Helpers
      6. Reducing Maintenance with Layouts and Partials
    5. 22. Migrations
      1. Creating and Running Migrations
      2. Anatomy of a Migration
      3. Managing Tables
      4. Advanced Migrations
      5. When Migrations Go Bad
      6. Schema Manipulation Outside Migrations
    6. 23. Nonbrowser Applications
      1. A Stand-Alone Application Using Active Record
      2. A Library Function Using Active Support
    7. 24. Rails’ DependenciesRails’ Dependencies
      1. Generating XML with Builder
      2. Generating HTML with ERB
      3. Managing Dependencies with Bundler
      4. Interfacing with the Web Server with Rack
      5. Automating Tasks with Rake
      6. Survey of Rails’ Dependencies
    8. 25. Rails Plugins
      1. Credit Card Processing with Active Merchant
      2. Beautifying Our Markup with Haml
      3. Pagination
      4. Additional Plugins worth Exploring
    9. 26. Where to Go from Here
  8. A1. Bibliography