So if I understand this right, what GitHub did was something like:
user = get_user_from_valid_email(params[:email])
send_reset_email(params[:email])
# instead of
# send_reset_email(user.email)
?
I've seen this pattern before and the reason is usually something about using the variable in memory as opposed to the function call. Total non-optimisation.
I've seen this pattern before and the reason is usually something about using the variable in memory as opposed to the function call. Total non-optimisation.