rosa-build/app/controllers/users/registrations_controller.rb

23 lines
583 B
Ruby

class Users::RegistrationsController < Devise::RegistrationsController
before_action :update_sanitized_params, if: :devise_controller?
# POST /resource
def create
# Try stop bots
if params[:recaptcha_response_field].present?
build_resource(sign_up_params)
respond_with(resource, location: after_inactive_sign_up_path_for(resource))
return
end
super
end
protected
def update_sanitized_params
devise_parameter_sanitizer.for(:sign_up) do |u|
u.permit(:uname, :name, :email, :password, :password_confirmation)
end
end
end