Class: LoyalPassport::Users::RegistrationsController

Inherits:
Devise::RegistrationsController
  • Object
show all
Includes:
Controllers::UsersBasic
Defined in:
app/controllers/loyal_passport/users/registrations_controller.rb

Instance Method Summary collapse

Methods included from Controllers::UsersBasic

included

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/controllers/loyal_passport/users/registrations_controller.rb', line 6

def create
  .permit(:nick_name, :permalink, :true_name, :captcha, :captcha_key)

  build_resource()

  if resource.save_with_captcha
    if resource.active_for_authentication?
      set_flash_message :notice, :signed_up if is_navigational_format?
      (resource_name, resource)
      respond_with resource, :location => (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 => (resource)
    end
  else
    clean_up_passwords resource
    respond_with resource
  end
end