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

22 lines
546 B
Ruby
Raw Normal View History

2013-08-28 16:15:28 +01:00
class Users::RegistrationsController < Devise::RegistrationsController
2014-03-27 14:25:15 +00:00
before_filter :update_sanitized_params, if: :devise_controller?
2013-08-28 16:15:28 +01:00
# POST /resource
def create
# Try stop bots
if params[:recaptcha_response_field].present?
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