Skip to content

Commit b00f75b

Browse files
committed
Add comment to def handle_confirmed_at_param
1 parent 6a40717 commit b00f75b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/controllers/super_admin/users_controller.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ def merge_accounts
140140
end
141141

142142
def handle_confirmed_at_param(attrs)
143+
# NOTE: The :confirmed_at param is controlled by a check_box in the form
144+
# `app/views/super_admin/users/_email_confirmation_status.html.erb`.
145+
# When the checkbox is checked, Rails submits the string '1' (indicating "confirmed").
146+
# When unchecked, it submits the string '0' (indicating "unconfirmed").
147+
143148
# if an unconfirmed email is now being confirmed
144149
if !@user.confirmed? && attrs[:confirmed_at] == '1'
145150
attrs[:confirmed_at] = Time.current

0 commit comments

Comments
 (0)