Fix ssh_key_destroy. Refs #2136

This commit is contained in:
Pavel Chipiga 2011-10-28 00:53:15 +03:00
parent 9ef2d73b6d
commit 0127b104a6
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class User < ActiveRecord::Base
update_ssh_key ssh_key_was, ssh_key
end
}
before_destroy { destroy_ssh_key(ssh_key) }
before_destroy { destroy_ssh_key(ssh_key) if ssh_key.present? }
# after_create() { UserMailer.new_user_notification(self).deliver }
class << self