Rails 3.0 deprecated f.error_messages
and now requires a plugin to work correctly - I however want to learn how to display error messages the (new) native way.
This functionality exists as a standalone gem dynamic_form.
Add the the following to your Gemfile
gem 'dynamic_form'
From the github page:
DynamicForm holds a few helpers method to help you deal with your Rails3 models, they are:
input(record, method, options = {})
form(record, options = {})
error_message_on(object, method, options={})
error_messages_for(record, options={})
It also adds f.error_messages
and f.error_message_on
to your form builders.