Class: Devise::RegistrationsController
- Inherits:
-
DeviseController
- Object
- DeviseController
- Devise::RegistrationsController
- Defined in:
- app/controllers/integrator/devise/registrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create {|resource| ... } ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/integrator/devise/registrations_controller.rb', line 13 def create build_resource(sign_up_params) resource.save yield resource if block_given? if resource.persisted? :notice, :signed_up sign_up(resource_name, resource) respond_with resource, location: root_path else clean_up_passwords resource set_minimum_password_length respond_with resource end end |
#new {|resource| ... } ⇒ Object
7 8 9 10 11 |
# File 'app/controllers/integrator/devise/registrations_controller.rb', line 7 def new build_resource({}) yield resource if block_given? respond_with resource end |