hubfeenix.fi/app/controllers/registrations_controller.rb

63 lines
1.3 KiB
Ruby

# frozen_string_literal: true
class RegistrationsController < Devise::RegistrationsController
# before_action :configure_sign_up_params, only: [:create]
# before_action :configure_account_update_params, only: [:update]
prepend_before_action :authenticate_scope!, only: [:edit_email]
# POST /resource
def create
puts "CREATE"
super
end
# GET /resource/edit
def edit_email
build_resource
puts "EDIT"
end
def edit
build_resource
super
end
# PUT /resource
def update
puts "UPDATE"
super
end
def resource_name
"member"
end
# DELETE /resource
# def destroy
# super
# end
# protected
# If you have extra params to permit, append them to the sanitizer.
# def configure_sign_up_params
# devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute])
# end
# If you have extra params to permit, append them to the sanitizer.
# def configure_account_update_params
# devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
# end
# The path used after sign up.
def after_sign_up_path_for(resource)
puts "after sign up"
super(resource)
end
# The path used after sign up for inactive accounts.
# def after_inactive_sign_up_path_for(resource)
# super(resource)
# end
end