My solution was based on @Alex answer. I did a custom password reset view.
When dealing with password requirement on devise model, there are two (or more) options:
First, we can override the devise password requirement method. This would save a model object without password:
def email_required?
false
end
Or we can set a simple token after the object creation:
if athlete.new_record?
generated_password = Devise.friendly_token[0,20]
athlete.password = generated_password
athlete.password_confirmation = generated_password
athlete.skip_confirmation!
end
Optionally, put the behavior above on model:
def reset_password!(new_password, new_password_confirmation)
self.password = new_password
self.password_confirmation = new_password_confirmation
save
end
Briefly, that was the solution, including a view with birthday, password and password confirmation, validating the data on controller and overriding the password.