Sha256: ab19f47dbeb41940c7adaf1c207d331e4d7db8a2b845dba95f0c3247ed36eb0f
Contents?: true
Size: 1.07 KB
Versions: 5
Compression:
Stored size: 1.07 KB
Contents
module DeviseSecurityExtension::Patches module RegistrationsControllerCaptcha extend ActiveSupport::Concern included do define_method :create do build_resource if valid_captcha? params[:captcha] if resource.save if resource.active_for_authentication? set_flash_message :notice, :signed_up if is_navigational_format? sign_in(resource_name, resource) respond_with resource, :location => after_sign_up_path_for(resource) else set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_navigational_format? expire_session_data_after_sign_in! respond_with resource, :location => after_inactive_sign_up_path_for(resource) end else clean_up_passwords resource respond_with resource end else resource.errors.add :base, t('devise.invalid_captcha') clean_up_passwords resource respond_with resource end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems