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

22 lines
565 B
Ruby
Raw Permalink Normal View History

2013-08-28 16:15:28 +01:00
class Users::RegistrationsController < Devise::RegistrationsController
2015-03-04 23:19:19 +00:00
before_action :update_sanitized_params, if: :devise_controller?
2014-03-27 14:25:15 +00:00
2013-08-28 16:15:28 +01:00
# POST /resource
def create
# Try stop bots
if params[:recaptcha_response_field].present?
build_resource(sign_up_params)
2014-01-21 04:51:49 +00:00
respond_with(resource, location: after_inactive_sign_up_path_for(resource))
2013-08-28 16:15:28 +01:00
return
end
super
end
2014-03-27 14:25:15 +00:00
protected
def update_sanitized_params
2017-07-29 22:45:02 +01:00
devise_parameter_sanitizer.permit(:sign_up, keys: [:uname, :name, :email, :password, :password_confirmation])
2014-03-27 14:25:15 +00:00
end
2017-07-29 22:45:02 +01:00
end