Sha256: 2f72e16b6afeed11cd6f28f11e4e410bdd79a49c7835e2ef4a595fa77b824e3c

Contents?: true

Size: 599 Bytes

Versions: 5

Compression:

Stored size: 599 Bytes

Contents


  def configure_devise_permitted_parameters
    sign_up_attributes = %i[email password password_confirmation name surname time_zone]
    sign_in_attributes = %i[email password password_confirmation current_password]
    if resource_class == User
      devise_parameter_sanitizer.permit(:sign_up, keys: sign_up_attributes)
      devise_parameter_sanitizer.permit(:sign_in, keys: sign_in_attributes)
    elsif resource_class == Admin
      devise_parameter_sanitizer.permit(:sign_up, keys: sign_up_attributes)
      devise_parameter_sanitizer.permit(:sign_in, keys: sign_in_attributes)
    end
  end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cybele-2.3.2 templates/devise/devise_strong_parameter.rb.erb
cybele-2.3.1 templates/devise/devise_strong_parameter.rb.erb
cybele-2.2.0 templates/devise/devise_strong_parameter.rb.erb
cybele-2.1.0 templates/devise/devise_strong_parameter.rb.erb
cybele-2.0.0 templates/devise/devise_strong_parameter.rb.erb