railstutorial/sample_app_2nd_ed — pull request #30 by suttonj (2013-03-06 00:38:38+00:00)
Title: Update to user.rb - before_save placed after validates

If I'm not mistaken, the before_save callback should be placed after the validate statements, otherwise the DB will attempt to save before validation, causing a rollback.