Book description
The “Bible” for Rails Development: Now Fully Updated for Rails 4.1
"When I read The Rails Way for the first time, I felt like I truly understood Rails for the first time.”
—From the Foreword by Steve Klabnik
Ruby on Rails 4 is leaner, tighter, and even more valuable to professional web developers. More than ever, it helps you focus on what matters most: delivering business value via clean and maintainable code.
The Rails™ 4 Way is the only comprehensive, authoritative guide to delivering production-quality code with Rails 4. Kevin Faustino joins pioneering Rails developer Obie Fernandez to illuminate the entire Rails 4 API, including its most powerful and modern idioms, design approaches, and libraries. They present extensive new and updated content on security, performance, caching, Haml, RSpec, Ajax, the Asset Pipeline, and more.
Through detailed code examples, you’ll dive deep into the Rails 4 code base, discover why Rails is designed as it is, and learn how to make it do exactly what you want. Proven in dozens of production systems, this book’s techniques will maximize your productivity and help you build more successful solutions. You’ll want to keep this guide by your computer—you’ll refer to it constantly.
This guide will help you
Build powerful, scalable REST-compliant APIs
Program complex program flows using Action Controller
Represent models, relationships, CRUD operations, searches, validation, callbacks, and more
Smoothly evolve application database schema via Migrations
Apply advanced Active Record techniques: single-table inheritance, polymorphic models, and more
Create visual elements with Action View and partials
Optimize performance and scalability with view caching
Master the highly productive Haml HTML templating engine
Make the most of Rails’ approach to session management
Secure your systems with Rails 4’s improved authentication and authorization
Resist SQL Injection, XSS, XSRF, and other attacks
Extend Rails with popular gems and plugins, and learn to write your own
Integrate email services with Action Mailer
Use Ajax via Rails 4 support for unobtrusive JavaScript
Improve responsiveness with background processing
Leverage Asset Pipeline to simplify development, improve perceived performance, and reduce server burdens
Accelerate implementation and promote maintainability with RSpec
Table of contents
- About This eBook
- Title Page
- Copyright Page
- Praise for The Rails Way
- Dedication Page
- Contents
- Foreword
- Foreword to the Previous Edition
- Foreword to the Previous Edition
- Introduction
- Acknowledgments
- About the Authors
- Chapter 1. Rails Environments and Configuration
- Chapter 2. Routing
-
Chapter 3. REST, Resources, and Rails
- 3.1 REST in a Rather Small Nutshell
- 3.2 Resources and Representations
- 3.3 REST in Rails
- 3.4 Routing and CRUD
- 3.5 The Standard RESTful Controller Actions
- 3.6 Singular Resource Routes
- 3.7 Nested Resources
- 3.8 Routing Concerns
- 3.9 RESTful Route Customizations
- 3.10 Controller-Only Resources
- 3.11 Different Representations of Resources
- 3.12 The RESTful Rails Action Set
- 3.13 Conclusion
- Chapter 4. Working with Controllers
- Chapter 5. Working with Active Record
- Chapter 6. Active Record Migrations
-
Chapter 7. Active Record Associations
- 7.1 The Association Hierarchy
- 7.2 One-to-Many Relationships
- 7.3 The belongs_to Association
- 7.4 The has_many Association
- 7.5 Many-to-Many Relationships
- 7.6 One-to-One Relationships
- 7.7 Working with Unsaved Objects and Associations
- 7.8 Association Extensions
- 7.9 The CollectionProxy Class
- 7.10 Conclusion
- Chapter 8. Validations
-
Chapter 9. Advanced Active Record
- 9.1 Scopes
- 9.2 Callbacks
- 9.3 Calculation Methods
- 9.4 Single-Table Inheritance (STI)
- 9.5 Abstract Base Model Classes
- 9.6 Polymorphic has_many Relationships
- 9.7 Enums
- 9.8 Foreign-Key Constraints
- 9.9 Modules for Reusing Common Behavior
- 9.10 Modifying Active Record Classes at Runtime
- 9.11 Using Value Objects
- 9.12 Nonpersisted Models
- 9.13 PostgreSQL Enhancements
- 9.14 Conclusion
- Chapter 10. Action View
-
Chapter 11. All about Helpers
- 11.1 ActiveModelHelper
- 11.2 AssetTagHelper
- 11.3 AtomFeedHelper
- 11.4 CacheHelper
- 11.5 CaptureHelper
- 11.6 CsrfHelper
- 11.7 DateHelper
- 11.8 DebugHelper
- 11.9 FormHelper
- 11.10 FormOptionsHelper
- 11.11 FormTagHelper
- 11.12 JavaScriptHelper
- 11.13 NumberHelper
- 11.14 OutputSafetyHelper
- 11.15 RecordTagHelper
- 11.16 RenderingHelper
- 11.17 SanitizeHelper
- 11.18 TagHelper
- 11.19 TextHelper
- 11.20 TranslationHelper and the I18n API
- 11.21 UrlHelper
- 11.22 Writing Your Own View Helpers
- 11.23 Wrapping and Generalizing Partials
- 11.24 Conclusion
- Chapter 12. Haml
- Chapter 13. Session Management
- Chapter 14. Authentication and Authorization
- Chapter 15. Security
- Chapter 16. Action Mailer
- Chapter 17. Caching and Performance
- Chapter 18. Background Processing
- Chapter 19. Ajax on Rails
- Chapter 20. Asset Pipeline
- Chapter 21. RSpec
- Chapter 22. XML
- Appendix A. Active Model API Reference
-
Appendix B. Active Support API Reference
- B.1 Array
- B.2 ActiveSupport::BacktraceCleaner
- B.3 Benchmark
- B.4 ActiveSupport::Benchmarkable
- B.5 BigDecimal
- B.6 ActiveSupport::Cache::Store
- B.7 ActiveSupport::CachingKeyGenerator
- B.8 ActiveSupport::Callbacks
- B.9 Class
- B.10 ActiveSupport::Concern
- B.11 ActiveSupport::Concurrency
- B.12 ActiveSupport::Configurable
- B.13 Date
- B.14 DateTime
- B.15 ActiveSupport::Dependencies
- B.16 ActiveSupport::Deprecation
- B.17 ActiveSupport::DescendantsTracker
- B.18 ActiveSupport::Duration
- B.19 Enumerable
- B.20 ERB::Util
- B.21 FalseClass
- B.22 File
- B.23 Hash
- B.24 ActiveSupport::Gzip
- B.25 ActiveSupport::HashWithIndifferentAccess
- B.26 ActiveSupport::Inflector::Inflections
- B.27 Integer
- B.28 ActiveSupport::JSON
- B.29 Kernel
- B.30 ActiveSupport::KeyGenerator
- B.31 ActiveSupport::Logger
- B.32 ActiveSupport::MessageEncryptor
- B.33 ActiveSupport::MessageVerifier
- B.34 Module
- B.35 ActiveSupport::Multibyte::Chars
- B.36 NilClass
- B.37 ActiveSupport::Notifications
- B.38 Object
- B.39 ActiveSupport::OrderedHash
- B.40 ActiveSupport::OrderedOptions
- B.41 ActiveSupport::PerThreadRegistry
- B.42 ActiveSupport::ProxyObject
- B.43 ActiveSupport::Railtie
- B.44 Range
- B.45 Regexp
- B.46 ActiveSupport::Rescuable
- B.47 String
- B.48 ActiveSupport::StringInquirer
- B.49 Struct
- B.50 ActiveSupport::Subscriber
- B.51 Symbol
- B.52 ActiveSupport::TaggedLogging
- B.53 ActiveSupport::TestCase
- B.54 ActiveSupport::Testing::Assertions
- B.55 Thread
- B.56 Time
- B.57 ActiveSupport::TimeWithZone
- B.58 ActiveSupport::TimeZone
- B.59 TrueClass
- B.60 ActiveSupport::XmlMini
- Appendix C. Rails Essentials
- Index
Product information
- Title: The Rails™ 4 Way, Third Edition
- Author(s):
- Release date: May 2014
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780133487954
You might also like
book
The Rails™ 3 Way, Second Edition
The Ruby on Rails Application Development Bible Ruby on Rails strips complexity from the development process, …
book
Crafting Rails 4 Applications, 2nd Edition
Get ready to see Rails as you've never seen it before. Learn how to extend the …
book
Ruby Under a Microscope
Ruby Under a Microscope gives developers an inside, hands-on look at Ruby's core, using simple diagrams …
book
Rails Crash Course
In Rails Crash Course, author Anthony Lewis shows you how to harness Rails to build web …