bradwrage blogg

About

sandals


Living and working in the Bay Area. Married to the most incredible woman. Resolved to live each and every day for the Lord.

Links

Twitter

    Me Elsewhere

    Rails error message

    To show a helpful error message in rails simply put

    <%= error_messages_for( :class = ‘action’) %> in the view that you want the error message to show.  Now this will work when you have some validation code in your model related to the view.  For example “validates_presence_of :title :artist”.  So when a user forgets to enter in the required fields they will be notified which fields they left out.



    March 18, 2009, 11:06am   Comments

    blog comments powered by Disqus