The "Bible" for Rails 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 delivering business value via clean and maintainable code. The Rails(TM)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 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
“The Rails 4 Way”, is a great reference book that covers most of what a Rails developer is likely to need on a daily basis. It covers the various DSLs and idioms (i.e. route definition, controller filter declaration, ActiveModel association and validations, etc) without getting into the details of Rails internals and how those features are implemented. The explanations are clear and the code examples relevant.
Just like Rails itself, “The Rails 4 Way” is opinionated and occasionally differs from the omakase way; Most notoriously, but hardly controversial, using Haml as a template engine and Rspec for testing.
Most of the book can be read cover-to-cover or used as a reference on particular topics. The exception is section about rails helpers (Chapter 11) which, as the author themselves point out, is really just an alphabetical listing of the methods available, like the one usually found on appendices or online documentation.
I recommend this book to new Rails developers (maybe after trying out an online tutorial) and for experienced Rails developers who are still working on Rails 3 (or 2!) and are expecting to make the jump to Rails 4 in the near future.
This book's description and its reviews led me to believe that it would discuss more of the bigger ideas behind how Rails is designed, those ideas that underlie the Rails conventions. The back cover, for example, promises that the reader will "discover why Rails is designed as it is."
But no such thing happens. Instead of discussing ideas or motivations, the book is mostly just a survey of Rails functionality. The vast majority of the book can be found in the Rails online documentation.
"The Rails 4 way" by Fernandez and Faustino is a great read about Ruby on Rails that goes through its various parts (Active Record, Action Pack and MVC, Routing, Testing & RSpec, JavaScript integration, Queues & ActiveJob, utilities & Active Support, Assets, and plenty others..).
It introduces the chapters progressively - but still requires a certain level of familiarity and background in the framework - covering the usage, concepts, API, practices, "Rails golden path(s)" so to speak, and even diving into the internal implementation occasionally.
You would read the book in order. choose the chapters that interests you the most, or keep it as a reference to any topic you want to revise later.
"Rails Guides" is a nice complementary resource with the book which also helps to catch up with the new release of Rails 5 ..
Before starting to read the book, being familiar with the Rails style guide at - https://github.com/bbatsov/rails-styl... , would set you up with the right attitude towards the book and safely skip chapters "Chapter 5 Working with ActiveRecord" and "Chapter 6 ActiveRecord migrations".
If you're time boxed, but also gain the most from the book regarding advanced Rails knowledge, go for chapters:
* Session Management, * Caching and Performance, * Background Processing, * Ajax on Rails (I personally never use the built-in AJAX functionality in Rails), * Asset Pipeline (it's better to know your enemy sooner than later), * RSpec (good intro, but you should check out "Rails 4 Test Prescriptions: Build a Healthy Codebase" at some point)
The very interesting book about Ruby on Rails framework. I have the edition of 2007 in one month. Covered mostly 70% of the book. But without practice it looks like a pure philosophy. Then applied in practice obtained theory and it worked. But anyway to practice Ruby on Rails you are to use API, good debugger like a pry, of course keep a Ruby handbook at your desktop, try TDD it really works, writing code and then covering it with tests quickly tests your understanding upon a subject, and thus you look at your code from different of views.