Skip to content

Instantly share code, notes, and snippets.

@kirkbushell
Created February 2, 2012 03:34
Show Gist options
  • Save kirkbushell/1721258 to your computer and use it in GitHub Desktop.
Save kirkbushell/1721258 to your computer and use it in GitHub Desktop.
Confirmation validation conditional
validates :password_confirmation, :presence => true, :if => Proc.new { |u| !u.password.blank? && u.password_confirmation.present? }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment