Class: Aikotoba::ConfirmsController
Instance Method Summary
collapse
#aikotoba_controller?
Methods included from Scopable
#aikotoba_scope, #aikotoba_scope_config, #aikotoba_scoped_path
#confirmable?, #lockable?, #recoverable?, #registerable?
Instance Method Details
#create ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
|
# File 'app/controllers/aikotoba/confirms_controller.rb', line 18
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
rescue ActiveRecord::RecordNotFound => e
failed_send_confirmation_token_process(e)
ensure
redirect_to success_send_confirmation_token_path, flash: {notice: success_send_confirmation_token_message}
end
|
#new ⇒ Object
14
15
16
|
# File 'app/controllers/aikotoba/confirms_controller.rb', line 14
def new
@account = build_account({email: "", password: ""})
end
|
#update ⇒ Object
30
31
32
33
34
35
36
|
# File 'app/controllers/aikotoba/confirms_controller.rb', line 30
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
|