Class: Lcms::Engine::RegistrationsController

Inherits:
Devise::RegistrationsController
  • Object
show all
Defined in:
app/controllers/lcms/engine/registrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#create {|resource| ... } ⇒ Object

NOTE: remove with reverting confiramble on, need this not to sign in user after sign up

Yields:

  • (resource)


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/lcms/engine/registrations_controller.rb', line 7

def create
  build_resource()

  resource.save
  yield resource if block_given?
  if resource.persisted?
    set_flash_message :notice, :signed_up
    expire_data_after_sign_in!
    respond_with resource, location: (resource)
  else
    clean_up_passwords resource
    set_minimum_password_length
    respond_with resource
  end
end