Q:

error_messages_for is deprecated in ruby - how do I find the replacement?

I am reading an old book (2008) to learn ruby and it is for rails 2.0.2. 
I have decided to use Rails 3 to find out the differences between the ruby back then to what it is now. Most of it has been good so far and I have been easily been able to find and correct the differences.
The problem I am having now, is that the code is using a deprecated function error_messages_for and upon looking at http://apidock.com/rails/ActionView/Helpers/ActiveRecordHelper/error_messages_for I cannot find a replacement or any way to show me what the new way is. Can someone help me find the new way to use error_messages_for and how I should go about finding the new way to do things and the way to discover the new best practices etc.

A:

f.error_messages in Rails 3.0
Rails error_messages helper
http://www.emersonlackey.com/article/rails3-error-messages-for-replacement
http://ariejan.net/2010/12/15/why-did-errormessagesfor-disappear-from-rails-3/
https://gist.github.com/1113828

Just the top 5 links found searching Google for "rails error_messages_for rails 3".
That said, you really should use an up-to-date book. Even the latest free Rails tutorials are covering Rails 3.

