Sha256: 7370d56a44d54eada76b742d7a7e72d220a80bde515f0062f76364e7b33a880e

Contents?: true

Size: 788 Bytes

Versions: 69

Compression:

Stored size: 788 Bytes

Contents

module Users
  class RegistrationsController < Devise::RegistrationsController
    before_action do
      authorize resource, nil, policy_class: UserRegistrationPolicy
    end

    def create
      build_resource(sign_up_params)

      resource.save
      yield resource if block_given?
      if resource.persisted?
        expire_data_after_sign_in!
        render_message
      else
        clean_up_passwords resource
        set_minimum_password_length
        respond_with resource
      end
    end

    def render_message
      msg = <<~HTML
        <div class="alert alert-info mt-4 d-inline-block">
          #{I18n.t 'devise.registrations.signed_up_but_unconfirmed'}
        </div>
      HTML
      render turbo_stream: turbo_stream.update('form-signup', msg)
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
pg_rails-7.1.16 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.15 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.14 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.13 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.12 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.11 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.10 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.9 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.8 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.7 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.6 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.5 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.4 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.3 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.2 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.1.pre.6 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.1.pre.5 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.1.pre.4 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.1.pre.3 pg_engine/app/controllers/users/registrations_controller.rb
pg_rails-7.1.1.pre.2 pg_engine/app/controllers/users/registrations_controller.rb