error_messages_for 'customer'

by convention looks for @customer. In your controller action, you need to do

def checkout
  @customer = Customer.new
end

Once you have error_messages_for working, you can view the source of your
page to see that error_messages_for generates specific markup for the
errors.

<div class="errorExplanation" id="errorExplanation">
  <h2>1 error prohibited this billing plan from being saved</h2>
  <p>There were problems with the following fields:</p>
  <ul>
    <li>Name can't be blank</li>
  </ul>
</div>

(Of course, the text in your error message(s) will be different.) Knowing
the markup, you should be able to style it as you like.

Regards,
Craig

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to