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

23 lines
583 B
Ruby
Raw 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
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