Sha256: 48fbbb27ef0007b78754a045e52327f11878fadf6a366c11678b722a144f39a9

Contents?: true

Size: 1022 Bytes

Versions: 31

Compression:

Stored size: 1022 Bytes

Contents

# frozen_string_literal: true

# DeviseParams
module DeviseParams
  extend ActiveSupport::Concern

  private

  def configure_permitted_parameters
    RUBY_VERSION < '2.2.0' ? devise_old : devise_new
  end

  def devise_new
    devise_parameter_sanitizer.permit(:sign_up,
                                      keys: %I[name email
                                               password
                                               password_confirmation])
    devise_parameter_sanitizer.permit(:account_update,
                                      keys: %I[name email
                                               password
                                               password_confirmation])
  end

  def devise_old
    devise_parameter_sanitizer.for(:sign_up) do |u|
      u.permit(:name, :email, :password, :password_confirmation)
    end
    devise_parameter_sanitizer.for(:account_update) do |u|
      u.permit(:name, :email, :password, :password_confirmation,
               :current_password)
    end
  end
end

Version data entries

31 entries across 30 versions & 1 rubygems

Version Path
keppler-2.1.22 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.21 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.20 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.19 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.18 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.18 testing-with-2.1.18/app/controllers/concerns/devise_params.rb
keppler-2.1.17 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.16 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.15 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.14 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.13 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.12 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.11 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.10 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.9 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.8 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.7 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.6 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.5 installer/core/app/controllers/concerns/devise_params.rb
keppler-2.1.4 installer/core/app/controllers/concerns/devise_params.rb