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?
|
2014-09-13 04:43:41 +01:00
|
|
|
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
|
|
|
|
devise_parameter_sanitizer.for(:sign_up) do |u|
|
|
|
|
u.permit(:uname, :name, :email, :password, :password_confirmation)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-08-28 16:15:28 +01:00
|
|
|
end
|