This book is written for Rails 3.2.
Unlike Rails 3.1, Rails 3.2 is truly only a minor release and includes few major changes. This book has been updated to reflect these changes.
Here’s an overview of some of the changes:For further details, see the release notes.
To run the examples provided in this book, it is important that you install the correct version of Rails, as described in Chapter 1, Installing Rails, on page 3. If you chose to download the examples, as described in Section 4, How To Read This Book, on page xxi, make sure that you select files from the rails32 directory.
To determine the version of Rails that you are running, you can issue rails -v at a command prompt.
Second Printing.
Rails 3.1 has some significant impacts on you as a Rails developer.has_secure_password method has been added to the model, which encapsulates and standardizes common user password hashing logic.Sam Ruby has updated the 4th edition of Agile Web Development with Rails to make it Rails 3.1 compatible.
Rails 3.1 has some significant impacts on you as a Rails developer.
has_secure_password method has been added to the model, which encapsulates and standardizes common user password hashing logic.Sam Ruby has updated the 4th edition of Agile Web Development with Rails to make it Rails 3.1 compatible, and we’re making this update available at no charge to existing owners of the ebook.
This beta incorporates a substantial amount of feedback from a number of sources including errata, formal reviews, and from the wonderful editor of this book. For the first time since putting this book out in beta, I am going to suggest that if you are well under way with Depot using a previous beta, consider keeping on with that beta. While there have been no major changes, there have been enough minor changes that those that wish to use this book are encouraged to start over.
This draft has also been tested against the Rails 3.0.3 release. No changes were needed to make the code in this book work against that release.
As always, thanks for all of the wonderful feedback via the errata, forums, and other venues. At this time I would like to specifically thank Johnathan Ritzi, David Kapp, and Jason Holloway. If you spot something, it is not too late to make a comment: there will be at least one more errata sweep before final printing.
The code download URLs were incorrect in the latest beta. This release fixes them. There are no other changes
This release includes a new chapter, Rails’ Dependencies.
New in this beta:
We have a new release candidate of Rails, as well as an official release of Ruby 1.9.2. I’m pleased to report that once again, no changes were made to any Rails API that affect the book. Furthermore, the regression that in the first release candidate which broke the ability to build the guides has been addressed.
New with this beta is a chapter on Action View, which covers templates, helpers, layouts, and partials. At this point, all three parts of the Model/View/Controller architecture are covered. Next up will be a chapter on accessing Rails applications from outside of a web server, either directly via APIs or as a web service.
The big news is that the release candidate for Rails has officially shipped. The better news is that no API changes were made to Rails that affect the book. Hopefully at this point releases of Rails will be made more quickly, and the API will remain stable.
New with this beta is a chapter on Action Dispatch and Action Controller, which covers both dispatching of requests to controllers, as well as controllers themselves. At this point, two of the three parts on the Model/View/Controller architecture are complete. Next up will be a chapter on Views.
Once gain, thanks for all of the wonderful feedback via the errata, forums, and other venues—keep it coming!
This beta adds two chapters. The first recaps what was learned in part 2: model, view, controller, configuration, testing, and deployment. It then continues with an explanation on how to generate documentation for your application.
Chapter 18 is also new with this beta: it goes directory by directory through your Rails application, describing what goes into to each. You will see how to generate documentation for Rails itself, how to build a Rake task, more information on configuration options and naming conventions. This all sets the stage for the chapters that follow.
The Rails team is in the process of deprecating config.log_path, but at the present time has not settled on its replacement. Furthermore this property is broken in Rails 3 beta 3. What you see in Section 16.3, Dealing with Log Files, on page 248 reflects what currently works, which may not necessarily be what will be supported in the final release.
This beta adds a deployment chapter which takes you through the installation, configuration, and usage of a number of tools: Apache, Capistrano, MySQL, and Passenger; as well as (mildly) deeper usage of Git and Bundler.
There’s not been another beta of Rails yet, so this is just a FYI at this point, but usage of {{name}} syntax in i18n strings will be deprecated; the preferred syntax is now %{name}.
This new release adds coverage of sending mail and integration testing in the new chapter, “Task H: Sending Mail.” You’ll learn how to send mail, how to function test mail, and how to integration test an end-to-end scenario spanning adding a product to a cart to the sending of a confirmation email.