Refactors account_info partial

This commit is contained in:
kikito
2015-10-07 19:39:59 +02:00
parent bc841a4799
commit d5d5e683d1
8 changed files with 16 additions and 10 deletions

View File

@@ -9,6 +9,8 @@ class Verification::Management::Email
validates :email, format: { with: Devise.email_regexp }, allow_blank: true
validate :validate_user
delegate :username, to: :user, allow_nil: true
def user
@user ||= User.where(email: email).first
end