I was running into trouble with a user profile "edit" page (Password doesn't match confirmation). It looks like one take on password confirmation is to only require it when the password changes (see
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/a11ca03dd4de61ea).
---
diff --git a/app/models/user.rb b/app/models/user.rb
index 372b62f..8901898 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -11,7 +11,7 @@ class User < ActiveRecord::Base
validates_uniqueness_of :email
validates_presence_of :password, :on => :create
- validates_confirmation_of :password
+ validates_confirmation_of :password, :if => :password_changed?
validates_presence_of :login
validates_uniqueness_of :login