Class: Aikotoba::ConfirmsController
Instance Method Summary
collapse
#aikotoba_controller?
#confirmable?, #lockable?, #recoverable?, #registerable?
Instance Method Details
#create ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'app/controllers/aikotoba/confirms_controller.rb', line 13
def create
account = find_by_send_token_account!(confirm_accounts_params)
before_send_confirmation_token_process
send_token_account!(account)
after_send_confirmation_token_process
redirect_to success_send_confirmation_token_path, flash: {notice: success_send_confirmation_token_message}
rescue ActiveRecord::RecordNotFound => e
failed_send_confirmation_token_process(e)
@account = build_account({email: "", password: ""})
flash[:alert] = failed_send_confirmation_token_message
render :new, status: :unprocessable_entity
end
|
#new ⇒ Object
9
10
11
|
# File 'app/controllers/aikotoba/confirms_controller.rb', line 9
def new
@account = build_account({email: "", password: ""})
end
|
#update ⇒ Object
26
27
28
29
30
31
32
|
# File 'app/controllers/aikotoba/confirms_controller.rb', line 26
def update
account = find_by_has_token_account!(params)
before_confirm_process
confirm_account!(account)
after_confirm_process
redirect_to after_confirmed_path, flash: {notice: confirmed_message}
end
|