Skip to content

Commit 5427043

Browse files
committed
Use User#email_required? to guard email validation
1 parent 1d22afb commit 5427043

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/user.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def proposals
9090

9191
#---[ Validations ]-----------------------------------------------------
9292

93-
validates_presence_of :email, :if => :complete_profile?
94-
validates_length_of :email, :within => 3..100, :if => :complete_profile?
93+
validates_presence_of :email, :if => :email_required?
94+
validates_length_of :email, :within => 3..100, :if => :email_required?
9595

9696
validates_presence_of :first_name, :if => :complete_profile?
9797
validates_presence_of :last_name, :if => :complete_profile?

0 commit comments

Comments
 (0)